| | | 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 Microsoft.Rest; |
| | | 14 | | using Newtonsoft.Json; |
| | | 15 | | using System.Collections; |
| | | 16 | | using System.Collections.Generic; |
| | | 17 | | using System.Linq; |
| | | 18 | | |
| | | 19 | | /// <summary> |
| | | 20 | | /// Represents a field in an index definition, which describes the name, |
| | | 21 | | /// data type, and search behavior of a field. |
| | | 22 | | /// <see |
| | | 23 | | /// href="https://docs.microsoft.com/rest/api/searchservice/Create-Index" |
| | | 24 | | /// /> |
| | | 25 | | /// </summary> |
| | | 26 | | public partial class Field |
| | | 27 | | { |
| | | 28 | | /// <summary> |
| | | 29 | | /// Initializes a new instance of the Field class. |
| | | 30 | | /// </summary> |
| | 100426 | 31 | | internal Field() |
| | | 32 | | { |
| | | 33 | | CustomInit(); |
| | 100426 | 34 | | } |
| | | 35 | | |
| | | 36 | | /// <summary> |
| | | 37 | | /// Initializes a new instance of the Field class. |
| | | 38 | | /// </summary> |
| | | 39 | | /// <param name="name">The name of the field, which must be unique |
| | | 40 | | /// within the fields collection of the index or parent field.</param> |
| | | 41 | | /// <param name="type">The data type of the field. Possible values |
| | | 42 | | /// include: 'Edm.String', 'Edm.Int32', 'Edm.Int64', 'Edm.Double', |
| | | 43 | | /// 'Edm.Boolean', 'Edm.DateTimeOffset', 'Edm.GeographyPoint', |
| | | 44 | | /// 'Edm.ComplexType'</param> |
| | | 45 | | /// <param name="key">A value indicating whether the field uniquely |
| | | 46 | | /// identifies documents in the index. Exactly one top-level field in |
| | | 47 | | /// each index must be chosen as the key field and it must be of type |
| | | 48 | | /// Edm.String. Key fields can be used to look up documents directly |
| | | 49 | | /// and update or delete specific documents. Default is false for |
| | | 50 | | /// simple fields and null for complex fields.</param> |
| | | 51 | | /// <param name="retrievable">A value indicating whether the field can |
| | | 52 | | /// be returned in a search result. You can disable this option if you |
| | | 53 | | /// want to use a field (for example, margin) as a filter, sorting, or |
| | | 54 | | /// scoring mechanism but do not want the field to be visible to the |
| | | 55 | | /// end user. This property must be true for key fields, and it must be |
| | | 56 | | /// null for complex fields. This property can be changed on existing |
| | | 57 | | /// fields. Enabling this property does not cause any increase in index |
| | | 58 | | /// storage requirements. Default is true for simple fields and null |
| | | 59 | | /// for complex fields.</param> |
| | | 60 | | /// <param name="searchable">A value indicating whether the field is |
| | | 61 | | /// full-text searchable. This means it will undergo analysis such as |
| | | 62 | | /// word-breaking during indexing. If you set a searchable field to a |
| | | 63 | | /// value like "sunny day", internally it will be split into the |
| | | 64 | | /// individual tokens "sunny" and "day". This enables full-text |
| | | 65 | | /// searches for these terms. Fields of type Edm.String or |
| | | 66 | | /// Collection(Edm.String) are searchable by default. This property |
| | | 67 | | /// must be false for simple fields of other non-string data types, and |
| | | 68 | | /// it must be null for complex fields. Note: searchable fields consume |
| | | 69 | | /// extra space in your index since Azure Cognitive Search will store |
| | | 70 | | /// an additional tokenized version of the field value for full-text |
| | | 71 | | /// searches. If you want to save space in your index and you don't |
| | | 72 | | /// need a field to be included in searches, set searchable to |
| | | 73 | | /// false.</param> |
| | | 74 | | /// <param name="filterable">A value indicating whether to enable the |
| | | 75 | | /// field to be referenced in $filter queries. filterable differs from |
| | | 76 | | /// searchable in how strings are handled. Fields of type Edm.String or |
| | | 77 | | /// Collection(Edm.String) that are filterable do not undergo |
| | | 78 | | /// word-breaking, so comparisons are for exact matches only. For |
| | | 79 | | /// example, if you set such a field f to "sunny day", $filter=f eq |
| | | 80 | | /// 'sunny' will find no matches, but $filter=f eq 'sunny day' will. |
| | | 81 | | /// This property must be null for complex fields. Default is true for |
| | | 82 | | /// simple fields and null for complex fields.</param> |
| | | 83 | | /// <param name="sortable">A value indicating whether to enable the |
| | | 84 | | /// field to be referenced in $orderby expressions. By default Azure |
| | | 85 | | /// Cognitive Search sorts results by score, but in many experiences |
| | | 86 | | /// users will want to sort by fields in the documents. A simple field |
| | | 87 | | /// can be sortable only if it is single-valued (it has a single value |
| | | 88 | | /// in the scope of the parent document). Simple collection fields |
| | | 89 | | /// cannot be sortable, since they are multi-valued. Simple sub-fields |
| | | 90 | | /// of complex collections are also multi-valued, and therefore cannot |
| | | 91 | | /// be sortable. This is true whether it's an immediate parent field, |
| | | 92 | | /// or an ancestor field, that's the complex collection. Complex fields |
| | | 93 | | /// cannot be sortable and the sortable property must be null for such |
| | | 94 | | /// fields. The default for sortable is true for single-valued simple |
| | | 95 | | /// fields, false for multi-valued simple fields, and null for complex |
| | | 96 | | /// fields.</param> |
| | | 97 | | /// <param name="facetable">A value indicating whether to enable the |
| | | 98 | | /// field to be referenced in facet queries. Typically used in a |
| | | 99 | | /// presentation of search results that includes hit count by category |
| | | 100 | | /// (for example, search for digital cameras and see hits by brand, by |
| | | 101 | | /// megapixels, by price, and so on). This property must be null for |
| | | 102 | | /// complex fields. Fields of type Edm.GeographyPoint or |
| | | 103 | | /// Collection(Edm.GeographyPoint) cannot be facetable. Default is true |
| | | 104 | | /// for all other simple fields.</param> |
| | | 105 | | /// <param name="analyzer">The name of the language analyzer to use for |
| | | 106 | | /// the field. This option can be used only with searchable fields and |
| | | 107 | | /// it can't be set together with either searchAnalyzer or |
| | | 108 | | /// indexAnalyzer. Once the analyzer is chosen, it cannot be changed |
| | | 109 | | /// for the field. Must be null for complex fields. Possible values |
| | | 110 | | /// include: 'ar.microsoft', 'ar.lucene', 'hy.lucene', 'bn.microsoft', |
| | | 111 | | /// 'eu.lucene', 'bg.microsoft', 'bg.lucene', 'ca.microsoft', |
| | | 112 | | /// 'ca.lucene', 'zh-Hans.microsoft', 'zh-Hans.lucene', |
| | | 113 | | /// 'zh-Hant.microsoft', 'zh-Hant.lucene', 'hr.microsoft', |
| | | 114 | | /// 'cs.microsoft', 'cs.lucene', 'da.microsoft', 'da.lucene', |
| | | 115 | | /// 'nl.microsoft', 'nl.lucene', 'en.microsoft', 'en.lucene', |
| | | 116 | | /// 'et.microsoft', 'fi.microsoft', 'fi.lucene', 'fr.microsoft', |
| | | 117 | | /// 'fr.lucene', 'gl.lucene', 'de.microsoft', 'de.lucene', |
| | | 118 | | /// 'el.microsoft', 'el.lucene', 'gu.microsoft', 'he.microsoft', |
| | | 119 | | /// 'hi.microsoft', 'hi.lucene', 'hu.microsoft', 'hu.lucene', |
| | | 120 | | /// 'is.microsoft', 'id.microsoft', 'id.lucene', 'ga.lucene', |
| | | 121 | | /// 'it.microsoft', 'it.lucene', 'ja.microsoft', 'ja.lucene', |
| | | 122 | | /// 'kn.microsoft', 'ko.microsoft', 'ko.lucene', 'lv.microsoft', |
| | | 123 | | /// 'lv.lucene', 'lt.microsoft', 'ml.microsoft', 'ms.microsoft', |
| | | 124 | | /// 'mr.microsoft', 'nb.microsoft', 'no.lucene', 'fa.lucene', |
| | | 125 | | /// 'pl.microsoft', 'pl.lucene', 'pt-BR.microsoft', 'pt-BR.lucene', |
| | | 126 | | /// 'pt-PT.microsoft', 'pt-PT.lucene', 'pa.microsoft', 'ro.microsoft', |
| | | 127 | | /// 'ro.lucene', 'ru.microsoft', 'ru.lucene', 'sr-cyrillic.microsoft', |
| | | 128 | | /// 'sr-latin.microsoft', 'sk.microsoft', 'sl.microsoft', |
| | | 129 | | /// 'es.microsoft', 'es.lucene', 'sv.microsoft', 'sv.lucene', |
| | | 130 | | /// 'ta.microsoft', 'te.microsoft', 'th.microsoft', 'th.lucene', |
| | | 131 | | /// 'tr.microsoft', 'tr.lucene', 'uk.microsoft', 'ur.microsoft', |
| | | 132 | | /// 'vi.microsoft', 'standard.lucene', 'standardasciifolding.lucene', |
| | | 133 | | /// 'keyword', 'pattern', 'simple', 'stop', 'whitespace'</param> |
| | | 134 | | /// <param name="searchAnalyzer">The name of the analyzer used at |
| | | 135 | | /// search time for the field. This option can be used only with |
| | | 136 | | /// searchable fields. It must be set together with indexAnalyzer and |
| | | 137 | | /// it cannot be set together with the analyzer option. This analyzer |
| | | 138 | | /// can be updated on an existing field. Must be null for complex |
| | | 139 | | /// fields. Possible values include: 'ar.microsoft', 'ar.lucene', |
| | | 140 | | /// 'hy.lucene', 'bn.microsoft', 'eu.lucene', 'bg.microsoft', |
| | | 141 | | /// 'bg.lucene', 'ca.microsoft', 'ca.lucene', 'zh-Hans.microsoft', |
| | | 142 | | /// 'zh-Hans.lucene', 'zh-Hant.microsoft', 'zh-Hant.lucene', |
| | | 143 | | /// 'hr.microsoft', 'cs.microsoft', 'cs.lucene', 'da.microsoft', |
| | | 144 | | /// 'da.lucene', 'nl.microsoft', 'nl.lucene', 'en.microsoft', |
| | | 145 | | /// 'en.lucene', 'et.microsoft', 'fi.microsoft', 'fi.lucene', |
| | | 146 | | /// 'fr.microsoft', 'fr.lucene', 'gl.lucene', 'de.microsoft', |
| | | 147 | | /// 'de.lucene', 'el.microsoft', 'el.lucene', 'gu.microsoft', |
| | | 148 | | /// 'he.microsoft', 'hi.microsoft', 'hi.lucene', 'hu.microsoft', |
| | | 149 | | /// 'hu.lucene', 'is.microsoft', 'id.microsoft', 'id.lucene', |
| | | 150 | | /// 'ga.lucene', 'it.microsoft', 'it.lucene', 'ja.microsoft', |
| | | 151 | | /// 'ja.lucene', 'kn.microsoft', 'ko.microsoft', 'ko.lucene', |
| | | 152 | | /// 'lv.microsoft', 'lv.lucene', 'lt.microsoft', 'ml.microsoft', |
| | | 153 | | /// 'ms.microsoft', 'mr.microsoft', 'nb.microsoft', 'no.lucene', |
| | | 154 | | /// 'fa.lucene', 'pl.microsoft', 'pl.lucene', 'pt-BR.microsoft', |
| | | 155 | | /// 'pt-BR.lucene', 'pt-PT.microsoft', 'pt-PT.lucene', 'pa.microsoft', |
| | | 156 | | /// 'ro.microsoft', 'ro.lucene', 'ru.microsoft', 'ru.lucene', |
| | | 157 | | /// 'sr-cyrillic.microsoft', 'sr-latin.microsoft', 'sk.microsoft', |
| | | 158 | | /// 'sl.microsoft', 'es.microsoft', 'es.lucene', 'sv.microsoft', |
| | | 159 | | /// 'sv.lucene', 'ta.microsoft', 'te.microsoft', 'th.microsoft', |
| | | 160 | | /// 'th.lucene', 'tr.microsoft', 'tr.lucene', 'uk.microsoft', |
| | | 161 | | /// 'ur.microsoft', 'vi.microsoft', 'standard.lucene', |
| | | 162 | | /// 'standardasciifolding.lucene', 'keyword', 'pattern', 'simple', |
| | | 163 | | /// 'stop', 'whitespace'</param> |
| | | 164 | | /// <param name="indexAnalyzer">The name of the analyzer used at |
| | | 165 | | /// indexing time for the field. This option can be used only with |
| | | 166 | | /// searchable fields. It must be set together with searchAnalyzer and |
| | | 167 | | /// it cannot be set together with the analyzer option. Once the |
| | | 168 | | /// analyzer is chosen, it cannot be changed for the field. Must be |
| | | 169 | | /// null for complex fields. Possible values include: 'ar.microsoft', |
| | | 170 | | /// 'ar.lucene', 'hy.lucene', 'bn.microsoft', 'eu.lucene', |
| | | 171 | | /// 'bg.microsoft', 'bg.lucene', 'ca.microsoft', 'ca.lucene', |
| | | 172 | | /// 'zh-Hans.microsoft', 'zh-Hans.lucene', 'zh-Hant.microsoft', |
| | | 173 | | /// 'zh-Hant.lucene', 'hr.microsoft', 'cs.microsoft', 'cs.lucene', |
| | | 174 | | /// 'da.microsoft', 'da.lucene', 'nl.microsoft', 'nl.lucene', |
| | | 175 | | /// 'en.microsoft', 'en.lucene', 'et.microsoft', 'fi.microsoft', |
| | | 176 | | /// 'fi.lucene', 'fr.microsoft', 'fr.lucene', 'gl.lucene', |
| | | 177 | | /// 'de.microsoft', 'de.lucene', 'el.microsoft', 'el.lucene', |
| | | 178 | | /// 'gu.microsoft', 'he.microsoft', 'hi.microsoft', 'hi.lucene', |
| | | 179 | | /// 'hu.microsoft', 'hu.lucene', 'is.microsoft', 'id.microsoft', |
| | | 180 | | /// 'id.lucene', 'ga.lucene', 'it.microsoft', 'it.lucene', |
| | | 181 | | /// 'ja.microsoft', 'ja.lucene', 'kn.microsoft', 'ko.microsoft', |
| | | 182 | | /// 'ko.lucene', 'lv.microsoft', 'lv.lucene', 'lt.microsoft', |
| | | 183 | | /// 'ml.microsoft', 'ms.microsoft', 'mr.microsoft', 'nb.microsoft', |
| | | 184 | | /// 'no.lucene', 'fa.lucene', 'pl.microsoft', 'pl.lucene', |
| | | 185 | | /// 'pt-BR.microsoft', 'pt-BR.lucene', 'pt-PT.microsoft', |
| | | 186 | | /// 'pt-PT.lucene', 'pa.microsoft', 'ro.microsoft', 'ro.lucene', |
| | | 187 | | /// 'ru.microsoft', 'ru.lucene', 'sr-cyrillic.microsoft', |
| | | 188 | | /// 'sr-latin.microsoft', 'sk.microsoft', 'sl.microsoft', |
| | | 189 | | /// 'es.microsoft', 'es.lucene', 'sv.microsoft', 'sv.lucene', |
| | | 190 | | /// 'ta.microsoft', 'te.microsoft', 'th.microsoft', 'th.lucene', |
| | | 191 | | /// 'tr.microsoft', 'tr.lucene', 'uk.microsoft', 'ur.microsoft', |
| | | 192 | | /// 'vi.microsoft', 'standard.lucene', 'standardasciifolding.lucene', |
| | | 193 | | /// 'keyword', 'pattern', 'simple', 'stop', 'whitespace'</param> |
| | | 194 | | /// <param name="synonymMaps">A list of the names of synonym maps to |
| | | 195 | | /// associate with this field. This option can be used only with |
| | | 196 | | /// searchable fields. Currently only one synonym map per field is |
| | | 197 | | /// supported. Assigning a synonym map to a field ensures that query |
| | | 198 | | /// terms targeting that field are expanded at query-time using the |
| | | 199 | | /// rules in the synonym map. This attribute can be changed on existing |
| | | 200 | | /// fields. Must be null or an empty collection for complex |
| | | 201 | | /// fields.</param> |
| | | 202 | | /// <param name="fields">A list of sub-fields if this is a field of |
| | | 203 | | /// type Edm.ComplexType or Collection(Edm.ComplexType). Must be null |
| | | 204 | | /// or empty for simple fields.</param> |
| | 0 | 205 | | internal Field(string name, DataType type, bool? key = default(bool?), bool? retrievable = default(bool?), bool? |
| | | 206 | | { |
| | 0 | 207 | | Name = name; |
| | 0 | 208 | | Type = type; |
| | 0 | 209 | | Key = key; |
| | 0 | 210 | | Retrievable = retrievable; |
| | 0 | 211 | | Searchable = searchable; |
| | 0 | 212 | | Filterable = filterable; |
| | 0 | 213 | | Sortable = sortable; |
| | 0 | 214 | | Facetable = facetable; |
| | 0 | 215 | | Analyzer = analyzer; |
| | 0 | 216 | | SearchAnalyzer = searchAnalyzer; |
| | 0 | 217 | | IndexAnalyzer = indexAnalyzer; |
| | 0 | 218 | | SynonymMaps = synonymMaps; |
| | 0 | 219 | | Fields = fields; |
| | | 220 | | CustomInit(); |
| | 0 | 221 | | } |
| | | 222 | | |
| | | 223 | | /// <summary> |
| | | 224 | | /// An initialization method that performs custom operations like setting defaults |
| | | 225 | | /// </summary> |
| | | 226 | | partial void CustomInit(); |
| | | 227 | | |
| | | 228 | | /// <summary> |
| | | 229 | | /// Gets or sets the name of the field, which must be unique within the |
| | | 230 | | /// fields collection of the index or parent field. |
| | | 231 | | /// </summary> |
| | | 232 | | [JsonProperty(PropertyName = "name")] |
| | 201400 | 233 | | public string Name { get; set; } |
| | | 234 | | |
| | | 235 | | /// <summary> |
| | | 236 | | /// Gets or sets the data type of the field. Possible values include: |
| | | 237 | | /// 'Edm.String', 'Edm.Int32', 'Edm.Int64', 'Edm.Double', |
| | | 238 | | /// 'Edm.Boolean', 'Edm.DateTimeOffset', 'Edm.GeographyPoint', |
| | | 239 | | /// 'Edm.ComplexType' |
| | | 240 | | /// </summary> |
| | | 241 | | [JsonProperty(PropertyName = "type")] |
| | 130002 | 242 | | public DataType Type { get; set; } |
| | | 243 | | |
| | | 244 | | /// <summary> |
| | | 245 | | /// Gets or sets a value indicating whether the field uniquely |
| | | 246 | | /// identifies documents in the index. Exactly one top-level field in |
| | | 247 | | /// each index must be chosen as the key field and it must be of type |
| | | 248 | | /// Edm.String. Key fields can be used to look up documents directly |
| | | 249 | | /// and update or delete specific documents. Default is false for |
| | | 250 | | /// simple fields and null for complex fields. |
| | | 251 | | /// </summary> |
| | | 252 | | [JsonProperty(PropertyName = "key")] |
| | 117530 | 253 | | internal bool? Key { get; set; } |
| | | 254 | | |
| | | 255 | | /// <summary> |
| | | 256 | | /// Gets or sets a value indicating whether the field can be returned |
| | | 257 | | /// in a search result. You can disable this option if you want to use |
| | | 258 | | /// a field (for example, margin) as a filter, sorting, or scoring |
| | | 259 | | /// mechanism but do not want the field to be visible to the end user. |
| | | 260 | | /// This property must be true for key fields, and it must be null for |
| | | 261 | | /// complex fields. This property can be changed on existing fields. |
| | | 262 | | /// Enabling this property does not cause any increase in index storage |
| | | 263 | | /// requirements. Default is true for simple fields and null for |
| | | 264 | | /// complex fields. |
| | | 265 | | /// </summary> |
| | | 266 | | [JsonProperty(PropertyName = "retrievable")] |
| | 118200 | 267 | | internal bool? Retrievable { get; set; } |
| | | 268 | | |
| | | 269 | | /// <summary> |
| | | 270 | | /// Gets or sets a value indicating whether the field is full-text |
| | | 271 | | /// searchable. This means it will undergo analysis such as |
| | | 272 | | /// word-breaking during indexing. If you set a searchable field to a |
| | | 273 | | /// value like "sunny day", internally it will be split into the |
| | | 274 | | /// individual tokens "sunny" and "day". This enables full-text |
| | | 275 | | /// searches for these terms. Fields of type Edm.String or |
| | | 276 | | /// Collection(Edm.String) are searchable by default. This property |
| | | 277 | | /// must be false for simple fields of other non-string data types, and |
| | | 278 | | /// it must be null for complex fields. Note: searchable fields consume |
| | | 279 | | /// extra space in your index since Azure Cognitive Search will store |
| | | 280 | | /// an additional tokenized version of the field value for full-text |
| | | 281 | | /// searches. If you want to save space in your index and you don't |
| | | 282 | | /// need a field to be included in searches, set searchable to false. |
| | | 283 | | /// </summary> |
| | | 284 | | [JsonProperty(PropertyName = "searchable")] |
| | 127882 | 285 | | internal bool? Searchable { get; set; } |
| | | 286 | | |
| | | 287 | | /// <summary> |
| | | 288 | | /// Gets or sets a value indicating whether to enable the field to be |
| | | 289 | | /// referenced in $filter queries. filterable differs from searchable |
| | | 290 | | /// in how strings are handled. Fields of type Edm.String or |
| | | 291 | | /// Collection(Edm.String) that are filterable do not undergo |
| | | 292 | | /// word-breaking, so comparisons are for exact matches only. For |
| | | 293 | | /// example, if you set such a field f to "sunny day", $filter=f eq |
| | | 294 | | /// 'sunny' will find no matches, but $filter=f eq 'sunny day' will. |
| | | 295 | | /// This property must be null for complex fields. Default is true for |
| | | 296 | | /// simple fields and null for complex fields. |
| | | 297 | | /// </summary> |
| | | 298 | | [JsonProperty(PropertyName = "filterable")] |
| | 126874 | 299 | | internal bool? Filterable { get; set; } |
| | | 300 | | |
| | | 301 | | /// <summary> |
| | | 302 | | /// Gets or sets a value indicating whether to enable the field to be |
| | | 303 | | /// referenced in $orderby expressions. By default Azure Cognitive |
| | | 304 | | /// Search sorts results by score, but in many experiences users will |
| | | 305 | | /// want to sort by fields in the documents. A simple field can be |
| | | 306 | | /// sortable only if it is single-valued (it has a single value in the |
| | | 307 | | /// scope of the parent document). Simple collection fields cannot be |
| | | 308 | | /// sortable, since they are multi-valued. Simple sub-fields of complex |
| | | 309 | | /// collections are also multi-valued, and therefore cannot be |
| | | 310 | | /// sortable. This is true whether it's an immediate parent field, or |
| | | 311 | | /// an ancestor field, that's the complex collection. Complex fields |
| | | 312 | | /// cannot be sortable and the sortable property must be null for such |
| | | 313 | | /// fields. The default for sortable is true for single-valued simple |
| | | 314 | | /// fields, false for multi-valued simple fields, and null for complex |
| | | 315 | | /// fields. |
| | | 316 | | /// </summary> |
| | | 317 | | [JsonProperty(PropertyName = "sortable")] |
| | 117458 | 318 | | internal bool? Sortable { get; set; } |
| | | 319 | | |
| | | 320 | | /// <summary> |
| | | 321 | | /// Gets or sets a value indicating whether to enable the field to be |
| | | 322 | | /// referenced in facet queries. Typically used in a presentation of |
| | | 323 | | /// search results that includes hit count by category (for example, |
| | | 324 | | /// search for digital cameras and see hits by brand, by megapixels, by |
| | | 325 | | /// price, and so on). This property must be null for complex fields. |
| | | 326 | | /// Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) |
| | | 327 | | /// cannot be facetable. Default is true for all other simple fields. |
| | | 328 | | /// </summary> |
| | | 329 | | [JsonProperty(PropertyName = "facetable")] |
| | 122038 | 330 | | internal bool? Facetable { get; set; } |
| | | 331 | | |
| | | 332 | | /// <summary> |
| | | 333 | | /// Gets or sets the name of the language analyzer to use for the |
| | | 334 | | /// field. This option can be used only with searchable fields and it |
| | | 335 | | /// can't be set together with either searchAnalyzer or indexAnalyzer. |
| | | 336 | | /// Once the analyzer is chosen, it cannot be changed for the field. |
| | | 337 | | /// Must be null for complex fields. Possible values include: |
| | | 338 | | /// 'ar.microsoft', 'ar.lucene', 'hy.lucene', 'bn.microsoft', |
| | | 339 | | /// 'eu.lucene', 'bg.microsoft', 'bg.lucene', 'ca.microsoft', |
| | | 340 | | /// 'ca.lucene', 'zh-Hans.microsoft', 'zh-Hans.lucene', |
| | | 341 | | /// 'zh-Hant.microsoft', 'zh-Hant.lucene', 'hr.microsoft', |
| | | 342 | | /// 'cs.microsoft', 'cs.lucene', 'da.microsoft', 'da.lucene', |
| | | 343 | | /// 'nl.microsoft', 'nl.lucene', 'en.microsoft', 'en.lucene', |
| | | 344 | | /// 'et.microsoft', 'fi.microsoft', 'fi.lucene', 'fr.microsoft', |
| | | 345 | | /// 'fr.lucene', 'gl.lucene', 'de.microsoft', 'de.lucene', |
| | | 346 | | /// 'el.microsoft', 'el.lucene', 'gu.microsoft', 'he.microsoft', |
| | | 347 | | /// 'hi.microsoft', 'hi.lucene', 'hu.microsoft', 'hu.lucene', |
| | | 348 | | /// 'is.microsoft', 'id.microsoft', 'id.lucene', 'ga.lucene', |
| | | 349 | | /// 'it.microsoft', 'it.lucene', 'ja.microsoft', 'ja.lucene', |
| | | 350 | | /// 'kn.microsoft', 'ko.microsoft', 'ko.lucene', 'lv.microsoft', |
| | | 351 | | /// 'lv.lucene', 'lt.microsoft', 'ml.microsoft', 'ms.microsoft', |
| | | 352 | | /// 'mr.microsoft', 'nb.microsoft', 'no.lucene', 'fa.lucene', |
| | | 353 | | /// 'pl.microsoft', 'pl.lucene', 'pt-BR.microsoft', 'pt-BR.lucene', |
| | | 354 | | /// 'pt-PT.microsoft', 'pt-PT.lucene', 'pa.microsoft', 'ro.microsoft', |
| | | 355 | | /// 'ro.lucene', 'ru.microsoft', 'ru.lucene', 'sr-cyrillic.microsoft', |
| | | 356 | | /// 'sr-latin.microsoft', 'sk.microsoft', 'sl.microsoft', |
| | | 357 | | /// 'es.microsoft', 'es.lucene', 'sv.microsoft', 'sv.lucene', |
| | | 358 | | /// 'ta.microsoft', 'te.microsoft', 'th.microsoft', 'th.lucene', |
| | | 359 | | /// 'tr.microsoft', 'tr.lucene', 'uk.microsoft', 'ur.microsoft', |
| | | 360 | | /// 'vi.microsoft', 'standard.lucene', 'standardasciifolding.lucene', |
| | | 361 | | /// 'keyword', 'pattern', 'simple', 'stop', 'whitespace' |
| | | 362 | | /// </summary> |
| | | 363 | | [JsonProperty(PropertyName = "analyzer")] |
| | 37368 | 364 | | public AnalyzerName? Analyzer { get; set; } |
| | | 365 | | |
| | | 366 | | /// <summary> |
| | | 367 | | /// Gets or sets the name of the analyzer used at search time for the |
| | | 368 | | /// field. This option can be used only with searchable fields. It must |
| | | 369 | | /// be set together with indexAnalyzer and it cannot be set together |
| | | 370 | | /// with the analyzer option. This analyzer can be updated on an |
| | | 371 | | /// existing field. Must be null for complex fields. Possible values |
| | | 372 | | /// include: 'ar.microsoft', 'ar.lucene', 'hy.lucene', 'bn.microsoft', |
| | | 373 | | /// 'eu.lucene', 'bg.microsoft', 'bg.lucene', 'ca.microsoft', |
| | | 374 | | /// 'ca.lucene', 'zh-Hans.microsoft', 'zh-Hans.lucene', |
| | | 375 | | /// 'zh-Hant.microsoft', 'zh-Hant.lucene', 'hr.microsoft', |
| | | 376 | | /// 'cs.microsoft', 'cs.lucene', 'da.microsoft', 'da.lucene', |
| | | 377 | | /// 'nl.microsoft', 'nl.lucene', 'en.microsoft', 'en.lucene', |
| | | 378 | | /// 'et.microsoft', 'fi.microsoft', 'fi.lucene', 'fr.microsoft', |
| | | 379 | | /// 'fr.lucene', 'gl.lucene', 'de.microsoft', 'de.lucene', |
| | | 380 | | /// 'el.microsoft', 'el.lucene', 'gu.microsoft', 'he.microsoft', |
| | | 381 | | /// 'hi.microsoft', 'hi.lucene', 'hu.microsoft', 'hu.lucene', |
| | | 382 | | /// 'is.microsoft', 'id.microsoft', 'id.lucene', 'ga.lucene', |
| | | 383 | | /// 'it.microsoft', 'it.lucene', 'ja.microsoft', 'ja.lucene', |
| | | 384 | | /// 'kn.microsoft', 'ko.microsoft', 'ko.lucene', 'lv.microsoft', |
| | | 385 | | /// 'lv.lucene', 'lt.microsoft', 'ml.microsoft', 'ms.microsoft', |
| | | 386 | | /// 'mr.microsoft', 'nb.microsoft', 'no.lucene', 'fa.lucene', |
| | | 387 | | /// 'pl.microsoft', 'pl.lucene', 'pt-BR.microsoft', 'pt-BR.lucene', |
| | | 388 | | /// 'pt-PT.microsoft', 'pt-PT.lucene', 'pa.microsoft', 'ro.microsoft', |
| | | 389 | | /// 'ro.lucene', 'ru.microsoft', 'ru.lucene', 'sr-cyrillic.microsoft', |
| | | 390 | | /// 'sr-latin.microsoft', 'sk.microsoft', 'sl.microsoft', |
| | | 391 | | /// 'es.microsoft', 'es.lucene', 'sv.microsoft', 'sv.lucene', |
| | | 392 | | /// 'ta.microsoft', 'te.microsoft', 'th.microsoft', 'th.lucene', |
| | | 393 | | /// 'tr.microsoft', 'tr.lucene', 'uk.microsoft', 'ur.microsoft', |
| | | 394 | | /// 'vi.microsoft', 'standard.lucene', 'standardasciifolding.lucene', |
| | | 395 | | /// 'keyword', 'pattern', 'simple', 'stop', 'whitespace' |
| | | 396 | | /// </summary> |
| | | 397 | | [JsonProperty(PropertyName = "searchAnalyzer")] |
| | 26554 | 398 | | public AnalyzerName? SearchAnalyzer { get; set; } |
| | | 399 | | |
| | | 400 | | /// <summary> |
| | | 401 | | /// Gets or sets the name of the analyzer used at indexing time for the |
| | | 402 | | /// field. This option can be used only with searchable fields. It must |
| | | 403 | | /// be set together with searchAnalyzer and it cannot be set together |
| | | 404 | | /// with the analyzer option. Once the analyzer is chosen, it cannot be |
| | | 405 | | /// changed for the field. Must be null for complex fields. Possible |
| | | 406 | | /// values include: 'ar.microsoft', 'ar.lucene', 'hy.lucene', |
| | | 407 | | /// 'bn.microsoft', 'eu.lucene', 'bg.microsoft', 'bg.lucene', |
| | | 408 | | /// 'ca.microsoft', 'ca.lucene', 'zh-Hans.microsoft', 'zh-Hans.lucene', |
| | | 409 | | /// 'zh-Hant.microsoft', 'zh-Hant.lucene', 'hr.microsoft', |
| | | 410 | | /// 'cs.microsoft', 'cs.lucene', 'da.microsoft', 'da.lucene', |
| | | 411 | | /// 'nl.microsoft', 'nl.lucene', 'en.microsoft', 'en.lucene', |
| | | 412 | | /// 'et.microsoft', 'fi.microsoft', 'fi.lucene', 'fr.microsoft', |
| | | 413 | | /// 'fr.lucene', 'gl.lucene', 'de.microsoft', 'de.lucene', |
| | | 414 | | /// 'el.microsoft', 'el.lucene', 'gu.microsoft', 'he.microsoft', |
| | | 415 | | /// 'hi.microsoft', 'hi.lucene', 'hu.microsoft', 'hu.lucene', |
| | | 416 | | /// 'is.microsoft', 'id.microsoft', 'id.lucene', 'ga.lucene', |
| | | 417 | | /// 'it.microsoft', 'it.lucene', 'ja.microsoft', 'ja.lucene', |
| | | 418 | | /// 'kn.microsoft', 'ko.microsoft', 'ko.lucene', 'lv.microsoft', |
| | | 419 | | /// 'lv.lucene', 'lt.microsoft', 'ml.microsoft', 'ms.microsoft', |
| | | 420 | | /// 'mr.microsoft', 'nb.microsoft', 'no.lucene', 'fa.lucene', |
| | | 421 | | /// 'pl.microsoft', 'pl.lucene', 'pt-BR.microsoft', 'pt-BR.lucene', |
| | | 422 | | /// 'pt-PT.microsoft', 'pt-PT.lucene', 'pa.microsoft', 'ro.microsoft', |
| | | 423 | | /// 'ro.lucene', 'ru.microsoft', 'ru.lucene', 'sr-cyrillic.microsoft', |
| | | 424 | | /// 'sr-latin.microsoft', 'sk.microsoft', 'sl.microsoft', |
| | | 425 | | /// 'es.microsoft', 'es.lucene', 'sv.microsoft', 'sv.lucene', |
| | | 426 | | /// 'ta.microsoft', 'te.microsoft', 'th.microsoft', 'th.lucene', |
| | | 427 | | /// 'tr.microsoft', 'tr.lucene', 'uk.microsoft', 'ur.microsoft', |
| | | 428 | | /// 'vi.microsoft', 'standard.lucene', 'standardasciifolding.lucene', |
| | | 429 | | /// 'keyword', 'pattern', 'simple', 'stop', 'whitespace' |
| | | 430 | | /// </summary> |
| | | 431 | | [JsonProperty(PropertyName = "indexAnalyzer")] |
| | 26554 | 432 | | public AnalyzerName? IndexAnalyzer { get; set; } |
| | | 433 | | |
| | | 434 | | /// <summary> |
| | | 435 | | /// Gets or sets a list of the names of synonym maps to associate with |
| | | 436 | | /// this field. This option can be used only with searchable fields. |
| | | 437 | | /// Currently only one synonym map per field is supported. Assigning a |
| | | 438 | | /// synonym map to a field ensures that query terms targeting that |
| | | 439 | | /// field are expanded at query-time using the rules in the synonym |
| | | 440 | | /// map. This attribute can be changed on existing fields. Must be null |
| | | 441 | | /// or an empty collection for complex fields. |
| | | 442 | | /// </summary> |
| | | 443 | | [JsonProperty(PropertyName = "synonymMaps")] |
| | 54554 | 444 | | public IList<string> SynonymMaps { get; set; } |
| | | 445 | | |
| | | 446 | | /// <summary> |
| | | 447 | | /// Gets or sets a list of sub-fields if this is a field of type |
| | | 448 | | /// Edm.ComplexType or Collection(Edm.ComplexType). Must be null or |
| | | 449 | | /// empty for simple fields. |
| | | 450 | | /// </summary> |
| | | 451 | | [JsonProperty(PropertyName = "fields")] |
| | 114278 | 452 | | public IList<Field> Fields { get; set; } |
| | | 453 | | |
| | | 454 | | /// <summary> |
| | | 455 | | /// Validate the object. |
| | | 456 | | /// </summary> |
| | | 457 | | /// <exception cref="ValidationException"> |
| | | 458 | | /// Thrown if validation fails |
| | | 459 | | /// </exception> |
| | | 460 | | public virtual void Validate() |
| | | 461 | | { |
| | 14002 | 462 | | if (Name == null) |
| | | 463 | | { |
| | 2 | 464 | | throw new ValidationException(ValidationRules.CannotBeNull, "Name"); |
| | | 465 | | } |
| | 14000 | 466 | | if (Fields != null) |
| | | 467 | | { |
| | 14938 | 468 | | foreach (var element in Fields) |
| | | 469 | | { |
| | 6436 | 470 | | if (element != null) |
| | | 471 | | { |
| | 6436 | 472 | | element.Validate(); |
| | | 473 | | } |
| | | 474 | | } |
| | | 475 | | } |
| | 13998 | 476 | | } |
| | | 477 | | } |
| | | 478 | | } |