-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
NGramTokenFilter.cs
67 lines (61 loc) · 2.22 KB
/
NGramTokenFilter.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Search.Models
{
using System;
using System.Linq;
using System.Collections.Generic;
using Newtonsoft.Json;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Microsoft.Rest.Azure;
/// <summary>
/// Generates n-grams of the given size(s). This token filter is
/// implemented using Apache Lucene.
/// <see href="http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/NGramTokenFilter.html" />
/// </summary>
[JsonObject("#Microsoft.Azure.Search.NGramTokenFilter")]
[Obsolete("This type is obsolete. Please use NGramTokenFilterV2 instead.")]
public partial class NGramTokenFilter : TokenFilter
{
/// <summary>
/// Initializes a new instance of the NGramTokenFilter class.
/// </summary>
public NGramTokenFilter() { }
/// <summary>
/// Initializes a new instance of the NGramTokenFilter class.
/// </summary>
public NGramTokenFilter(string name, int? minGram = default(int?), int? maxGram = default(int?))
: base(name)
{
MinGram = minGram;
MaxGram = maxGram;
}
/// <summary>
/// Gets or sets the minimum n-gram length. Default is 1. Must be less
/// than the value of minGram.
/// </summary>
[JsonProperty(PropertyName = "minGram")]
public int? MinGram { get; set; }
/// <summary>
/// Gets or sets the maximum n-gram length. Default is 2.
/// </summary>
[JsonProperty(PropertyName = "maxGram")]
public int? MaxGram { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public override void Validate()
{
base.Validate();
}
}
}