Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tjoubert committed Oct 11, 2022
1 parent 05bee2c commit 799f99f
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class AnalyzerProperties
public bool? Stemming { get; set; }

/// <summary>
/// Introduced in 3.10. for minHash analyzers.
/// Introduced in 3.10 for minHash analyzers.
/// An Analyzer-like definition with a type (string)
/// and a properties attribute (object)
/// This is the inner analyzer to use for incoming data.
Expand Down
22 changes: 4 additions & 18 deletions arangodb-net-standard/ViewApi/Models/SearchAliasIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ namespace ArangoDBNetStandard.ViewApi.Models
{
public class SearchAliasIndex
{
/// <summary>
/// Possible value for <see cref="Operation"/>
/// </summary>
public const string SearchAliasIndexAddOperation = "add";

/// <summary>
/// Possible value for <see cref="Operation"/>
/// </summary>
public const string SearchAliasIndexDelOperation = "del";

/// <summary>
/// Possible value for <see cref="Operation"/>
/// </summary>
public const string SearchAliasIndexNoOperation = "";

/// <summary>
/// Name of the collection
/// </summary>
Expand All @@ -34,9 +19,10 @@ public class SearchAliasIndex
/// <summary>
/// Optional. Type of operation.
/// Possible values:
/// <see cref="SearchAliasIndexAddOperation"/>,
/// <see cref="SearchAliasIndexDelOperation"/>, or
/// <see cref="SearchAliasIndexNoOperation"/>
/// <see cref="SearchAliasIndexOperation.Add"/>, or
/// <see cref="SearchAliasIndexOperation.Del"/>
/// Only relevant when updating the
/// properties of a View definition.
/// </summary>
public string Operation { get; set; }
}
Expand Down
24 changes: 24 additions & 0 deletions arangodb-net-standard/ViewApi/Models/SearchAliasIndexOperation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArangoDBNetStandard.ViewApi.Models
{
/// <summary>
/// Possible operations for search alias indexes.
/// </summary>
public static class SearchAliasIndexOperation
{
/// <summary>
/// Add the index to the stored indexes
/// property of the View.
/// </summary>
public const string Add = "add";

/// <summary>
/// Remove the index from the stored indexes
/// property of the View.
/// </summary>
public const string Del = "del";
}
}
23 changes: 23 additions & 0 deletions arangodb-net-standard/ViewApi/Models/SortCompressionTypes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArangoDBNetStandard.ViewApi.Models
{
/// <summary>
/// Defines values for ArangoDB sort compression types.
/// Possible value for <see cref="ViewDetails.PrimarySortCompression"/>
/// </summary>
public static class SortCompressionTypes
{
/// <summary>
/// Use LZ4 fast compression.
/// </summary>
public const string LZ4 = "lz4";

/// <summary>
/// Disable compression to trade space for speed.
/// </summary>
public const string None = "none";
}
}
28 changes: 4 additions & 24 deletions arangodb-net-standard/ViewApi/Models/ViewDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,15 @@ namespace ArangoDBNetStandard.ViewApi.Models
/// </summary>
public class ViewDetails
{
/// <summary>
/// Possible value for <see cref="Type"/>
/// </summary>
public const string ArangoSearchViewType = "arangosearch";

/// <summary>
/// Possible value for <see cref="Type"/>
/// </summary>
public const string SearchAliasViewType = "search-alias";

/// <summary>
/// Possible value for <see cref="PrimarySortCompression"/>
/// </summary>
public const string LZ4SortCompression = "lz4";

/// <summary>
/// Possible value for <see cref="PrimarySortCompression"/>
/// </summary>
public const string NoSortCompression = "none";

/// <summary>
/// The name of the View.
/// </summary>
public string Name { get; set; }

/// <summary>
/// The type of the View.
/// Can be set to <see cref="ArangoSearchViewType"/>
/// or <see cref="SearchAliasViewType"/>
/// Can be set to <see cref="ViewTypes.ArangoSearch"/>
/// or <see cref="ViewTypes.SearchAlias"/>
/// when creating a view.
/// This option is immutable.
/// </summary>
Expand Down Expand Up @@ -88,8 +68,8 @@ public class ViewDetails
/// (introduced in v3.7.1). ArangoDB v3.5 and v3.6
/// always compress the index using LZ4.
/// This option is immutable. Possible values:
/// 1) <see cref="LZ4SortCompression"/> (default): use LZ4 fast compression.
/// 2) <see cref="NoSortCompression"/>: disable compression to trade space for speed.
/// 1) <see cref="SortCompressionTypes.LZ4"/> (default): use LZ4 fast compression.
/// 2) <see cref="SortCompressionTypes.None"/>: disable compression to trade space for speed.
/// Read more about this in the documentation.
/// </summary>
public string PrimarySortCompression { get; set; }
Expand Down
23 changes: 23 additions & 0 deletions arangodb-net-standard/ViewApi/Models/ViewTypes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArangoDBNetStandard.ViewApi.Models
{
/// <summary>
/// Defines values for ArangoDB view types.
/// Possible value for <see cref="ViewDetails.Type"/>
/// </summary>
public static class ViewTypes
{
/// <summary>
/// See https://www.arangodb.com/docs/stable/arangosearch-views.html
/// </summary>
public const string ArangoSearch = "arangosearch";

/// <summary>
/// See https://www.arangodb.com/docs/stable/arangosearch-views-search-alias.html
/// </summary>
public const string SearchAlias = "search-alias";
}
}

0 comments on commit 799f99f

Please sign in to comment.