| | 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.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Linq; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Removes stop words from a token stream. This token filter is |
| | 20 | | /// implemented using Apache Lucene. |
| | 21 | | /// <see |
| | 22 | | /// href="http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/StopFilter.html" |
| | 23 | | /// /> |
| | 24 | | /// </summary> |
| | 25 | | [Newtonsoft.Json.JsonObject("#Microsoft.Azure.Search.StopwordsTokenFilter")] |
| | 26 | | public partial class StopwordsTokenFilter : TokenFilter |
| | 27 | | { |
| | 28 | | /// <summary> |
| | 29 | | /// Initializes a new instance of the StopwordsTokenFilter class. |
| | 30 | | /// </summary> |
| 68 | 31 | | public StopwordsTokenFilter() |
| | 32 | | { |
| | 33 | | CustomInit(); |
| 68 | 34 | | } |
| | 35 | |
|
| | 36 | | /// <summary> |
| | 37 | | /// Initializes a new instance of the StopwordsTokenFilter class. |
| | 38 | | /// </summary> |
| | 39 | | /// <param name="name">The name of the token filter. It must only |
| | 40 | | /// contain letters, digits, spaces, dashes or underscores, can only |
| | 41 | | /// start and end with alphanumeric characters, and is limited to 128 |
| | 42 | | /// characters.</param> |
| | 43 | | /// <param name="stopwords">The list of stopwords. This property and |
| | 44 | | /// the stopwords list property cannot both be set.</param> |
| | 45 | | /// <param name="stopwordsList">A predefined list of stopwords to use. |
| | 46 | | /// This property and the stopwords property cannot both be set. |
| | 47 | | /// Default is English. Possible values include: 'arabic', 'armenian', |
| | 48 | | /// 'basque', 'brazilian', 'bulgarian', 'catalan', 'czech', 'danish', |
| | 49 | | /// 'dutch', 'english', 'finnish', 'french', 'galician', 'german', |
| | 50 | | /// 'greek', 'hindi', 'hungarian', 'indonesian', 'irish', 'italian', |
| | 51 | | /// 'latvian', 'norwegian', 'persian', 'portuguese', 'romanian', |
| | 52 | | /// 'russian', 'sorani', 'spanish', 'swedish', 'thai', |
| | 53 | | /// 'turkish'</param> |
| | 54 | | /// <param name="ignoreCase">A value indicating whether to ignore case. |
| | 55 | | /// If true, all words are converted to lower case first. Default is |
| | 56 | | /// false.</param> |
| | 57 | | /// <param name="removeTrailingStopWords">A value indicating whether to |
| | 58 | | /// ignore the last search term if it's a stop word. Default is |
| | 59 | | /// true.</param> |
| | 60 | | public StopwordsTokenFilter(string name, IList<string> stopwords = default(IList<string>), StopwordsList? stopwo |
| 70 | 61 | | : base(name) |
| | 62 | | { |
| 70 | 63 | | Stopwords = stopwords; |
| 70 | 64 | | StopwordsList = stopwordsList; |
| 70 | 65 | | IgnoreCase = ignoreCase; |
| 70 | 66 | | RemoveTrailingStopWords = removeTrailingStopWords; |
| | 67 | | CustomInit(); |
| 70 | 68 | | } |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// An initialization method that performs custom operations like setting defaults |
| | 72 | | /// </summary> |
| | 73 | | partial void CustomInit(); |
| | 74 | |
|
| | 75 | | /// <summary> |
| | 76 | | /// Gets or sets the list of stopwords. This property and the stopwords |
| | 77 | | /// list property cannot both be set. |
| | 78 | | /// </summary> |
| | 79 | | [JsonProperty(PropertyName = "stopwords")] |
| 342 | 80 | | public IList<string> Stopwords { get; set; } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Gets or sets a predefined list of stopwords to use. This property |
| | 84 | | /// and the stopwords property cannot both be set. Default is English. |
| | 85 | | /// Possible values include: 'arabic', 'armenian', 'basque', |
| | 86 | | /// 'brazilian', 'bulgarian', 'catalan', 'czech', 'danish', 'dutch', |
| | 87 | | /// 'english', 'finnish', 'french', 'galician', 'german', 'greek', |
| | 88 | | /// 'hindi', 'hungarian', 'indonesian', 'irish', 'italian', 'latvian', |
| | 89 | | /// 'norwegian', 'persian', 'portuguese', 'romanian', 'russian', |
| | 90 | | /// 'sorani', 'spanish', 'swedish', 'thai', 'turkish' |
| | 91 | | /// </summary> |
| | 92 | | [JsonProperty(PropertyName = "stopwordsList")] |
| 342 | 93 | | public StopwordsList? StopwordsList { get; set; } |
| | 94 | |
|
| | 95 | | /// <summary> |
| | 96 | | /// Gets or sets a value indicating whether to ignore case. If true, |
| | 97 | | /// all words are converted to lower case first. Default is false. |
| | 98 | | /// </summary> |
| | 99 | | [JsonProperty(PropertyName = "ignoreCase")] |
| 342 | 100 | | public bool? IgnoreCase { get; set; } |
| | 101 | |
|
| | 102 | | /// <summary> |
| | 103 | | /// Gets or sets a value indicating whether to ignore the last search |
| | 104 | | /// term if it's a stop word. Default is true. |
| | 105 | | /// </summary> |
| | 106 | | [JsonProperty(PropertyName = "removeTrailing")] |
| 342 | 107 | | public bool? RemoveTrailingStopWords { get; set; } |
| | 108 | |
|
| | 109 | | /// <summary> |
| | 110 | | /// Validate the object. |
| | 111 | | /// </summary> |
| | 112 | | /// <exception cref="Rest.ValidationException"> |
| | 113 | | /// Thrown if validation fails |
| | 114 | | /// </exception> |
| | 115 | | public override void Validate() |
| | 116 | | { |
| 68 | 117 | | base.Validate(); |
| 68 | 118 | | } |
| | 119 | | } |
| | 120 | | } |