SearchIndex Class

Represents a search index definition, which describes the fields and search behavior of an index.

All required parameters must be populated in order to send to Azure.

Inheritance
SearchIndex

Constructor

SearchIndex(**kwargs)

Parameters

name
str
Required

Required. The name of the index.

fields
list[SearchField]
Required

Required. The fields of the index.

scoring_profiles
list[ScoringProfile]
Required

The scoring profiles for the index.

default_scoring_profile
str
Required

The name of the scoring profile to use if none is specified in the query. If this property is not set and no scoring profile is specified in the query, then default scoring (tf-idf) will be used.

cors_options
CorsOptions
Required

Options to control Cross-Origin Resource Sharing (CORS) for the index.

suggesters
list[<xref:azure.search.documents.indexes.models.SearchSuggester>]
Required

The suggesters for the index.

analyzers
list[LexicalAnalyzer]
Required

The analyzers for the index.

tokenizers
list[LexicalTokenizer]
Required

The tokenizers for the index.

token_filters
list[TokenFilter]
Required

The token filters for the index.

char_filters
list[CharFilter]
Required

The character filters for the index.

encryption_key
SearchResourceEncryptionKey
Required

A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

similarity
<xref:azure.search.documents.indexes.models.SimilarityAlgorithm>
Required

The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. The similarity algorithm can only be defined at index creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used.

e_tag
str
Required

The ETag of the index.