SearchField Class

Definition

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

public class SearchField
type SearchField = class
Public Class SearchField
Inheritance
SearchField

Constructors

SearchField(String, SearchFieldDataType)

Initializes a new instance of the SearchField class.

Properties

AnalyzerName

Gets or sets the name of the analyzer to use for the field. This option can be used only with searchable fields and it cannot be set together with either SearchAnalyzerName or IndexAnalyzerName. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields.

Fields

Gets a list of nested fields if this field is of type Complex or "Collection(DataType.Complex)".

IndexAnalyzerName

Gets or sets 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 SearchAnalyzerName 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. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields.

IsFacetable

Gets or sets a value indicating whether the field can be retrieved in facet queries. The default is null. This property must be null for complex fields, but can be set on simple fields within a complex field.

IsFilterable

Gets or sets a value indicating whether the field can be referenced in $filter queries. The default is null. This property must be null for complex fields, but can be set on simple fields within a complex field.

IsHidden

Gets or sets a value indicating whether the field will be returned in a search result. The default is null. This property must be true for key fields, and must be null for complex fields.

IsKey

Gets or sets whether the field is the key field. The default is null. A SearchIndex must have exactly one key field of type String.

IsSearchable

Gets or sets a value indicating whether the field is full-text searchable. The default is null. This means it will undergo analysis such as word-breaking during indexing. This property can be true only for String or "Collection(DataType.String)". It must be false for non-string simple fields, and null for complex fields.

IsSortable

Gets or sets a value indicating whether the field can be referenced in a $orderby expression. The default is null. A simple field can be sortable only if it is a single-valued type such as String or Int32.

Name

Gets the name of the field.

SearchAnalyzerName

Gets or sets 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. Must be null for complex fields.

SynonymMapNames

Gets a list of names of synonym maps associated with this field. Only fields where IsSearchable is true can have associated synonym maps.

Type

Ge the data type of the field.

Methods

ToString()

Returns a string that represents the current object.

Applies to