| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 3 | | // license information. |
| | 4 | | // |
| | 5 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 6 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 7 | | // regenerated. |
| | 8 | |
|
| | 9 | | namespace Microsoft.Azure.Search.Models |
| | 10 | | { |
| | 11 | | using System; |
| | 12 | | using System.Linq; |
| | 13 | | using System.Collections.Generic; |
| | 14 | | using Newtonsoft.Json; |
| | 15 | | using Microsoft.Rest; |
| | 16 | | using Microsoft.Rest.Serialization; |
| | 17 | | using Microsoft.Rest.Azure; |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// Generates n-grams of the given size(s). This token filter is |
| | 21 | | /// implemented using Apache Lucene. |
| | 22 | | /// <see href="http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/NGramTokenFilt |
| | 23 | | /// </summary> |
| | 24 | | [JsonObject("#Microsoft.Azure.Search.NGramTokenFilter")] |
| | 25 | | [Obsolete("This type is obsolete. Please use NGramTokenFilterV2 instead.")] |
| | 26 | | public partial class NGramTokenFilter : TokenFilter |
| | 27 | | { |
| | 28 | | /// <summary> |
| | 29 | | /// Initializes a new instance of the NGramTokenFilter class. |
| | 30 | | /// </summary> |
| 0 | 31 | | public NGramTokenFilter() { } |
| | 32 | |
|
| | 33 | | /// <summary> |
| | 34 | | /// Initializes a new instance of the NGramTokenFilter class. |
| | 35 | | /// </summary> |
| | 36 | | public NGramTokenFilter(string name, int? minGram = default(int?), int? maxGram = default(int?)) |
| 0 | 37 | | : base(name) |
| | 38 | | { |
| 0 | 39 | | MinGram = minGram; |
| 0 | 40 | | MaxGram = maxGram; |
| 0 | 41 | | } |
| | 42 | |
|
| | 43 | | /// <summary> |
| | 44 | | /// Gets or sets the minimum n-gram length. Default is 1. Must be less |
| | 45 | | /// than the value of minGram. |
| | 46 | | /// </summary> |
| | 47 | | [JsonProperty(PropertyName = "minGram")] |
| 0 | 48 | | public int? MinGram { get; set; } |
| | 49 | |
|
| | 50 | | /// <summary> |
| | 51 | | /// Gets or sets the maximum n-gram length. Default is 2. |
| | 52 | | /// </summary> |
| | 53 | | [JsonProperty(PropertyName = "maxGram")] |
| 0 | 54 | | public int? MaxGram { get; set; } |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// Validate the object. |
| | 58 | | /// </summary> |
| | 59 | | /// <exception cref="ValidationException"> |
| | 60 | | /// Thrown if validation fails |
| | 61 | | /// </exception> |
| | 62 | | public override void Validate() |
| | 63 | | { |
| 0 | 64 | | base.Validate(); |
| 0 | 65 | | } |
| | 66 | | } |
| | 67 | | } |