SimpleField interface

Represents a field in an index definition, which describes the name, data type, and search behavior of a field.

Properties

analyzerName

The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field.

facetable

A value indicating whether to enable the field to be referenced in facet queries. Typically used in a presentation of search results that includes hit count by category (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so on). Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default is false.

filterable

A value indicating whether to enable the field to be referenced in $filter queries. filterable differs from searchable in how strings are handled. Fields of type Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to "sunny day", $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. Default is false.

hidden

A value indicating whether the field can be returned in a search result. You can disable this option if you want to use a field (for example, margin) as a filter, sorting, or scoring mechanism but do not want the field to be visible to the end user. This property must be false for key fields. This property can be changed on existing fields. Enabling this property does not cause any increase in index storage requirements. Default is true for vector fields, false otherwise.

indexAnalyzerName

The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field.

key

A value indicating whether the field uniquely identifies documents in the index. Exactly one top-level field in each index must be chosen as the key field and it must be of type Edm.String. Key fields can be used to look up documents directly and update or delete specific documents. Default is false.

name

The name of the field, which must be unique within the fields collection of the index or parent field.

searchable

A value indicating whether the field is full-text searchable. This means it will undergo analysis such as word-breaking during indexing. If you set a searchable field to a value like "sunny day", internally it will be split into the individual tokens "sunny" and "day". This enables full-text searches for these terms. Fields of type Edm.String or Collection(Edm.String) are searchable by default. This property must be false for simple fields of other non-string data types. Note: searchable fields consume extra space in your index to accommodate additional tokenized versions of the field value for full-text searches. If you want to save space in your index and you don't need a field to be included in searches, set searchable to false. Default is false.

searchAnalyzerName

The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzerName and it cannot be set together with the analyzerName option. This property cannot be set to the name of a language analyzer; use the analyzerName property instead if you need a language analyzer. This analyzer can be updated on an existing field.

sortable

A value indicating whether to enable the field to be referenced in $orderby expressions. By default, the search engine sorts results by score, but in many experiences users will want to sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single value in the scope of the parent document). Simple collection fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex collections are also multi-valued, and therefore cannot be sortable. This is true whether it's an immediate parent field, or an ancestor field, that's the complex collection. The default is false.

stored

An immutable value indicating whether the field will be persisted separately on disk to be returned in a search result. You can disable this option if you don't plan to return the field contents in a search response to save on storage overhead. This can only be set during index creation and only for vector fields. This property cannot be changed for existing fields or set as false for new fields. If this property is set as false, the property 'hidden' must be set to 'true'. This property must be false or unset for key fields, for new fields, and for non-vector fields. Disabling this property will reduce index storage requirements.

synonymMapNames

A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules in the synonym map. This attribute can be changed on existing fields.

type

The data type of the field.

vectorEncodingFormat

The encoding format to interpret the field contents.

vectorSearchDimensions

The dimensionality of the vector field.

vectorSearchProfileName

The name of the vector search profile that specifies the algorithm and vectorizer to use when searching the vector field.

Property Details

analyzerName

The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field.

analyzerName?: string

Property Value

string

facetable

A value indicating whether to enable the field to be referenced in facet queries. Typically used in a presentation of search results that includes hit count by category (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so on). Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default is false.

facetable?: boolean

Property Value

boolean

filterable

A value indicating whether to enable the field to be referenced in $filter queries. filterable differs from searchable in how strings are handled. Fields of type Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to "sunny day", $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. Default is false.

filterable?: boolean

Property Value

boolean

hidden

A value indicating whether the field can be returned in a search result. You can disable this option if you want to use a field (for example, margin) as a filter, sorting, or scoring mechanism but do not want the field to be visible to the end user. This property must be false for key fields. This property can be changed on existing fields. Enabling this property does not cause any increase in index storage requirements. Default is true for vector fields, false otherwise.

hidden?: boolean

Property Value

boolean

indexAnalyzerName

The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field.

indexAnalyzerName?: string

Property Value

string

key

A value indicating whether the field uniquely identifies documents in the index. Exactly one top-level field in each index must be chosen as the key field and it must be of type Edm.String. Key fields can be used to look up documents directly and update or delete specific documents. Default is false.

key?: boolean

Property Value

boolean

name

The name of the field, which must be unique within the fields collection of the index or parent field.

name: string

Property Value

string

searchable

A value indicating whether the field is full-text searchable. This means it will undergo analysis such as word-breaking during indexing. If you set a searchable field to a value like "sunny day", internally it will be split into the individual tokens "sunny" and "day". This enables full-text searches for these terms. Fields of type Edm.String or Collection(Edm.String) are searchable by default. This property must be false for simple fields of other non-string data types. Note: searchable fields consume extra space in your index to accommodate additional tokenized versions of the field value for full-text searches. If you want to save space in your index and you don't need a field to be included in searches, set searchable to false. Default is false.

searchable?: boolean

Property Value

boolean

searchAnalyzerName

The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzerName and it cannot be set together with the analyzerName option. This property cannot be set to the name of a language analyzer; use the analyzerName property instead if you need a language analyzer. This analyzer can be updated on an existing field.

searchAnalyzerName?: string

Property Value

string

sortable

A value indicating whether to enable the field to be referenced in $orderby expressions. By default, the search engine sorts results by score, but in many experiences users will want to sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single value in the scope of the parent document). Simple collection fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex collections are also multi-valued, and therefore cannot be sortable. This is true whether it's an immediate parent field, or an ancestor field, that's the complex collection. The default is false.

sortable?: boolean

Property Value

boolean

stored

An immutable value indicating whether the field will be persisted separately on disk to be returned in a search result. You can disable this option if you don't plan to return the field contents in a search response to save on storage overhead. This can only be set during index creation and only for vector fields. This property cannot be changed for existing fields or set as false for new fields. If this property is set as false, the property 'hidden' must be set to 'true'. This property must be false or unset for key fields, for new fields, and for non-vector fields. Disabling this property will reduce index storage requirements.

stored?: boolean

Property Value

boolean

synonymMapNames

A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules in the synonym map. This attribute can be changed on existing fields.

synonymMapNames?: string[]

Property Value

string[]

type

The data type of the field.

type: SearchFieldDataType

Property Value

vectorEncodingFormat

The encoding format to interpret the field contents.

vectorEncodingFormat?: string

Property Value

string

vectorSearchDimensions

The dimensionality of the vector field.

vectorSearchDimensions?: number

Property Value

number

vectorSearchProfileName

The name of the vector search profile that specifies the algorithm and vectorizer to use when searching the vector field.

vectorSearchProfileName?: string

Property Value

string