| | 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 | | /// Splits words into subwords and performs optional transformations on |
| | 20 | | /// subword groups. This token filter is implemented using Apache Lucene. |
| | 21 | | /// <see |
| | 22 | | /// href="http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/WordDelimit |
| | 23 | | /// /> |
| | 24 | | /// </summary> |
| | 25 | | [Newtonsoft.Json.JsonObject("#Microsoft.Azure.Search.WordDelimiterTokenFilter")] |
| | 26 | | public partial class WordDelimiterTokenFilter : TokenFilter |
| | 27 | | { |
| | 28 | | /// <summary> |
| | 29 | | /// Initializes a new instance of the WordDelimiterTokenFilter class. |
| | 30 | | /// </summary> |
| 4 | 31 | | public WordDelimiterTokenFilter() |
| | 32 | | { |
| | 33 | | CustomInit(); |
| 4 | 34 | | } |
| | 35 | |
|
| | 36 | | /// <summary> |
| | 37 | | /// Initializes a new instance of the WordDelimiterTokenFilter 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="generateWordParts">A value indicating whether to |
| | 44 | | /// generate part words. If set, causes parts of words to be generated; |
| | 45 | | /// for example "AzureSearch" becomes "Azure" "Search". Default is |
| | 46 | | /// true.</param> |
| | 47 | | /// <param name="generateNumberParts">A value indicating whether to |
| | 48 | | /// generate number subwords. Default is true.</param> |
| | 49 | | /// <param name="catenateWords">A value indicating whether maximum runs |
| | 50 | | /// of word parts will be catenated. For example, if this is set to |
| | 51 | | /// true, "Azure-Search" becomes "AzureSearch". Default is |
| | 52 | | /// false.</param> |
| | 53 | | /// <param name="catenateNumbers">A value indicating whether maximum |
| | 54 | | /// runs of number parts will be catenated. For example, if this is set |
| | 55 | | /// to true, "1-2" becomes "12". Default is false.</param> |
| | 56 | | /// <param name="catenateAll">A value indicating whether all subword |
| | 57 | | /// parts will be catenated. For example, if this is set to true, |
| | 58 | | /// "Azure-Search-1" becomes "AzureSearch1". Default is false.</param> |
| | 59 | | /// <param name="splitOnCaseChange">A value indicating whether to split |
| | 60 | | /// words on caseChange. For example, if this is set to true, |
| | 61 | | /// "AzureSearch" becomes "Azure" "Search". Default is true.</param> |
| | 62 | | /// <param name="preserveOriginal">A value indicating whether original |
| | 63 | | /// words will be preserved and added to the subword list. Default is |
| | 64 | | /// false.</param> |
| | 65 | | /// <param name="splitOnNumerics">A value indicating whether to split |
| | 66 | | /// on numbers. For example, if this is set to true, "Azure1Search" |
| | 67 | | /// becomes "Azure" "1" "Search". Default is true.</param> |
| | 68 | | /// <param name="stemEnglishPossessive">A value indicating whether to |
| | 69 | | /// remove trailing "'s" for each subword. Default is true.</param> |
| | 70 | | /// <param name="protectedWords">A list of tokens to protect from being |
| | 71 | | /// delimited.</param> |
| | 72 | | public WordDelimiterTokenFilter(string name, bool? generateWordParts = default(bool?), bool? generateNumberParts |
| 6 | 73 | | : base(name) |
| | 74 | | { |
| 6 | 75 | | GenerateWordParts = generateWordParts; |
| 6 | 76 | | GenerateNumberParts = generateNumberParts; |
| 6 | 77 | | CatenateWords = catenateWords; |
| 6 | 78 | | CatenateNumbers = catenateNumbers; |
| 6 | 79 | | CatenateAll = catenateAll; |
| 6 | 80 | | SplitOnCaseChange = splitOnCaseChange; |
| 6 | 81 | | PreserveOriginal = preserveOriginal; |
| 6 | 82 | | SplitOnNumerics = splitOnNumerics; |
| 6 | 83 | | StemEnglishPossessive = stemEnglishPossessive; |
| 6 | 84 | | ProtectedWords = protectedWords; |
| | 85 | | CustomInit(); |
| 6 | 86 | | } |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// An initialization method that performs custom operations like setting defaults |
| | 90 | | /// </summary> |
| | 91 | | partial void CustomInit(); |
| | 92 | |
|
| | 93 | | /// <summary> |
| | 94 | | /// Gets or sets a value indicating whether to generate part words. If |
| | 95 | | /// set, causes parts of words to be generated; for example |
| | 96 | | /// "AzureSearch" becomes "Azure" "Search". Default is true. |
| | 97 | | /// </summary> |
| | 98 | | [JsonProperty(PropertyName = "generateWordParts")] |
| 22 | 99 | | public bool? GenerateWordParts { get; set; } |
| | 100 | |
|
| | 101 | | /// <summary> |
| | 102 | | /// Gets or sets a value indicating whether to generate number |
| | 103 | | /// subwords. Default is true. |
| | 104 | | /// </summary> |
| | 105 | | [JsonProperty(PropertyName = "generateNumberParts")] |
| 22 | 106 | | public bool? GenerateNumberParts { get; set; } |
| | 107 | |
|
| | 108 | | /// <summary> |
| | 109 | | /// Gets or sets a value indicating whether maximum runs of word parts |
| | 110 | | /// will be catenated. For example, if this is set to true, |
| | 111 | | /// "Azure-Search" becomes "AzureSearch". Default is false. |
| | 112 | | /// </summary> |
| | 113 | | [JsonProperty(PropertyName = "catenateWords")] |
| 22 | 114 | | public bool? CatenateWords { get; set; } |
| | 115 | |
|
| | 116 | | /// <summary> |
| | 117 | | /// Gets or sets a value indicating whether maximum runs of number |
| | 118 | | /// parts will be catenated. For example, if this is set to true, "1-2" |
| | 119 | | /// becomes "12". Default is false. |
| | 120 | | /// </summary> |
| | 121 | | [JsonProperty(PropertyName = "catenateNumbers")] |
| 22 | 122 | | public bool? CatenateNumbers { get; set; } |
| | 123 | |
|
| | 124 | | /// <summary> |
| | 125 | | /// Gets or sets a value indicating whether all subword parts will be |
| | 126 | | /// catenated. For example, if this is set to true, "Azure-Search-1" |
| | 127 | | /// becomes "AzureSearch1". Default is false. |
| | 128 | | /// </summary> |
| | 129 | | [JsonProperty(PropertyName = "catenateAll")] |
| 22 | 130 | | public bool? CatenateAll { get; set; } |
| | 131 | |
|
| | 132 | | /// <summary> |
| | 133 | | /// Gets or sets a value indicating whether to split words on |
| | 134 | | /// caseChange. For example, if this is set to true, "AzureSearch" |
| | 135 | | /// becomes "Azure" "Search". Default is true. |
| | 136 | | /// </summary> |
| | 137 | | [JsonProperty(PropertyName = "splitOnCaseChange")] |
| 22 | 138 | | public bool? SplitOnCaseChange { get; set; } |
| | 139 | |
|
| | 140 | | /// <summary> |
| | 141 | | /// Gets or sets a value indicating whether original words will be |
| | 142 | | /// preserved and added to the subword list. Default is false. |
| | 143 | | /// </summary> |
| | 144 | | [JsonProperty(PropertyName = "preserveOriginal")] |
| 22 | 145 | | public bool? PreserveOriginal { get; set; } |
| | 146 | |
|
| | 147 | | /// <summary> |
| | 148 | | /// Gets or sets a value indicating whether to split on numbers. For |
| | 149 | | /// example, if this is set to true, "Azure1Search" becomes "Azure" "1" |
| | 150 | | /// "Search". Default is true. |
| | 151 | | /// </summary> |
| | 152 | | [JsonProperty(PropertyName = "splitOnNumerics")] |
| 22 | 153 | | public bool? SplitOnNumerics { get; set; } |
| | 154 | |
|
| | 155 | | /// <summary> |
| | 156 | | /// Gets or sets a value indicating whether to remove trailing "'s" for |
| | 157 | | /// each subword. Default is true. |
| | 158 | | /// </summary> |
| | 159 | | [JsonProperty(PropertyName = "stemEnglishPossessive")] |
| 22 | 160 | | public bool? StemEnglishPossessive { get; set; } |
| | 161 | |
|
| | 162 | | /// <summary> |
| | 163 | | /// Gets or sets a list of tokens to protect from being delimited. |
| | 164 | | /// </summary> |
| | 165 | | [JsonProperty(PropertyName = "protectedWords")] |
| 22 | 166 | | public IList<string> ProtectedWords { get; set; } |
| | 167 | |
|
| | 168 | | /// <summary> |
| | 169 | | /// Validate the object. |
| | 170 | | /// </summary> |
| | 171 | | /// <exception cref="Rest.ValidationException"> |
| | 172 | | /// Thrown if validation fails |
| | 173 | | /// </exception> |
| | 174 | | public override void Validate() |
| | 175 | | { |
| 4 | 176 | | base.Validate(); |
| 4 | 177 | | } |
| | 178 | | } |
| | 179 | | } |