| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.Search.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using System.Linq; |
| | 15 | |
|
| | 16 | | /// <summary> |
| | 17 | | /// Filters out tokens with same text as the previous token. This token |
| | 18 | | /// filter is implemented using Apache Lucene. |
| | 19 | | /// <see |
| | 20 | | /// href="http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/RemoveDupli |
| | 21 | | /// /> |
| | 22 | | /// </summary> |
| | 23 | | [Newtonsoft.Json.JsonObject("#Microsoft.Azure.Search.UniqueTokenFilter")] |
| | 24 | | public partial class UniqueTokenFilter : TokenFilter |
| | 25 | | { |
| | 26 | | /// <summary> |
| | 27 | | /// Initializes a new instance of the UniqueTokenFilter class. |
| | 28 | | /// </summary> |
| 4 | 29 | | public UniqueTokenFilter() |
| | 30 | | { |
| | 31 | | CustomInit(); |
| 4 | 32 | | } |
| | 33 | |
|
| | 34 | | /// <summary> |
| | 35 | | /// Initializes a new instance of the UniqueTokenFilter class. |
| | 36 | | /// </summary> |
| | 37 | | /// <param name="name">The name of the token filter. It must only |
| | 38 | | /// contain letters, digits, spaces, dashes or underscores, can only |
| | 39 | | /// start and end with alphanumeric characters, and is limited to 128 |
| | 40 | | /// characters.</param> |
| | 41 | | /// <param name="onlyOnSamePosition">A value indicating whether to |
| | 42 | | /// remove duplicates only at the same position. Default is |
| | 43 | | /// false.</param> |
| | 44 | | public UniqueTokenFilter(string name, bool? onlyOnSamePosition = default(bool?)) |
| 4 | 45 | | : base(name) |
| | 46 | | { |
| 4 | 47 | | OnlyOnSamePosition = onlyOnSamePosition; |
| | 48 | | CustomInit(); |
| 4 | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// An initialization method that performs custom operations like setting defaults |
| | 53 | | /// </summary> |
| | 54 | | partial void CustomInit(); |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// Gets or sets a value indicating whether to remove duplicates only |
| | 58 | | /// at the same position. Default is false. |
| | 59 | | /// </summary> |
| | 60 | | [JsonProperty(PropertyName = "onlyOnSamePosition")] |
| 20 | 61 | | public bool? OnlyOnSamePosition { get; set; } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Validate the object. |
| | 65 | | /// </summary> |
| | 66 | | /// <exception cref="Rest.ValidationException"> |
| | 67 | | /// Thrown if validation fails |
| | 68 | | /// </exception> |
| | 69 | | public override void Validate() |
| | 70 | | { |
| 4 | 71 | | base.Validate(); |
| 4 | 72 | | } |
| | 73 | | } |
| | 74 | | } |