-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
PathHierarchyTokenizer.cs
69 lines (61 loc) · 2.64 KB
/
PathHierarchyTokenizer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
namespace Microsoft.Azure.Search.Models
{
using System;
using Newtonsoft.Json;
/// <summary>
/// Tokenizer for path-like hierarchies. This tokenizer is implemented
/// using Apache Lucene.
/// <see href="http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/path/PathHierarchyTokenizer.html" />
/// </summary>
[JsonObject("#Microsoft.Azure.Search.PathHierarchyTokenizer")]
[Obsolete("This type is obsolete. Please use PathHierarchyTokenizerV2 instead.")]
public partial class PathHierarchyTokenizer : Tokenizer
{
/// <summary>
/// Initializes a new instance of the PathHierarchyTokenizer class.
/// </summary>
public PathHierarchyTokenizer() { }
/// <summary>
/// Initializes a new instance of the PathHierarchyTokenizer class.
/// </summary>
public PathHierarchyTokenizer(string name, char? delimiter = default(char?), char? replacement = default(char?), int? bufferSize = default(int?), bool? reverseTokenOrder = default(bool?), int? numberOfTokensToSkip = default(int?))
: base(name)
{
Delimiter = delimiter;
Replacement = replacement;
BufferSize = bufferSize;
ReverseTokenOrder = reverseTokenOrder;
NumberOfTokensToSkip = numberOfTokensToSkip;
}
/// <summary>
/// Gets or sets the delimiter character to use. Default is "/".
/// </summary>
[JsonProperty(PropertyName = "delimiter")]
public char? Delimiter { get; set; }
/// <summary>
/// Gets or sets a value that, if set, replaces the delimiter
/// character. Default is "/".
/// </summary>
[JsonProperty(PropertyName = "replacement")]
public char? Replacement { get; set; }
/// <summary>
/// Gets or sets the buffer size. Default is 1024.
/// </summary>
[JsonProperty(PropertyName = "bufferSize")]
public int? BufferSize { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to generate tokens in
/// reverse order. Default is false.
/// </summary>
[JsonProperty(PropertyName = "reverse")]
public bool? ReverseTokenOrder { get; set; }
/// <summary>
/// Gets or sets the number of initial tokens to skip. Default is 0.
/// </summary>
[JsonProperty(PropertyName = "skip")]
public int? NumberOfTokensToSkip { get; set; }
}
}