SearchIndex Class

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

Constructor

SearchIndex()

Variables

Name Description
name
str

The name of the index. Required.

description
str

The description of the index.

fields
list[<xref:"SearchField">]

The fields of the index. Required.

scoringProfiles
list[<xref:"ScoringProfile">]

The scoring profiles for the index.

defaultScoringProfile
str

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.

corsOptions
<xref:<xref:"CorsOptions">>

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

suggesters
list[<xref:"SearchSuggester">]

The suggesters for the index.

analyzers
list[<xref:"LexicalAnalyzer">]

The analyzers for the index.

tokenizers
list[<xref:"LexicalTokenizer">]

The tokenizers for the index.

tokenFilters
list[<xref:"TokenFilter">]

The token filters for the index.

charFilters
list[<xref:"CharFilter">]

The character filters for the index.

normalizers
list[<xref:"LexicalNormalizer">]

The normalizers for the index.

encryptionKey
<xref:<xref:"SearchResourceEncryptionKey">>

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. Once you have encrypted your data, it will always remain encrypted. The search service 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:<xref:"SimilarityAlgorithm">>

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.

semantic
<xref:<xref:"SemanticSearch">>

Defines parameters for a search index that influence semantic capabilities.

vectorSearch
<xref:<xref:"VectorSearch">>

Contains configuration options related to vector search.

permissionFilterOption
Union[str, <xref:"SearchIndexPermissionFilterOption">]

A value indicating whether permission filtering is enabled for the index. Known values are: "enabled" and "disabled".

sharePointConnectorAppRegistration
<xref:<xref:"SharePointConnectorAppRegistration">>

Configures a SharePoint connector app registration for the index, enabling document-level permissions from SharePoint. If provided, the applicationId and federatedCredentialId properties are required.

@odata.etag
str

The ETag of the index.

Methods

clear
copy
fromkeys

Create a new dictionary with keys from iterable and values set to value.

get

Return the value for key if key is in the dictionary, else default.

items
keys
pop

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values

clear

clear() -> None.  Remove all items from D.

copy

copy() -> a shallow copy of D

fromkeys

Create a new dictionary with keys from iterable and values set to value.

fromkeys(value=None, /)

Positional-Only Parameters

Name Description
iterable
Required
value
Default value: None

get

Return the value for key if key is in the dictionary, else default.

get(key, default=None, /)

Positional-Only Parameters

Name Description
key
Required
default
Default value: None

items

items() -> a set-like object providing a view on D's items

keys

keys() -> a set-like object providing a view on D's keys

pop

If the key is not found, return the default if given; otherwise, raise a KeyError.

pop(k, [d]) -> v, remove specified key and return the corresponding value.

popitem

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

popitem()

setdefault

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

setdefault(key, default=None, /)

Positional-Only Parameters

Name Description
key
Required
default
Default value: None

update

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

update([E], **F) -> None.  Update D from mapping/iterable E and F.

values

values() -> an object providing a view on D's values

Attributes

analyzers

analyzers: list['LexicalAnalyzer']

charFilters

charFilters: list['CharFilter']

corsOptions

corsOptions: CorsOptions | None

defaultScoringProfile

defaultScoringProfile: str

description

description: str

encryptionKey

encryptionKey: SearchResourceEncryptionKey | None

fields

fields: Required[list['SearchField']]

name

name: Required[str]

normalizers

normalizers: list['LexicalNormalizer']

permissionFilterOption

permissionFilterOption: str | SearchIndexPermissionFilterOption | None

scoringProfiles

scoringProfiles: list['ScoringProfile']

semantic

semantic: SemanticSearch | None

sharePointConnectorAppRegistration

sharePointConnectorAppRegistration: SharePointConnectorAppRegistration

similarity

similarity: SimilarityAlgorithm

suggesters

suggesters: list['SearchSuggester']

tokenFilters

tokenFilters: list['TokenFilter']

tokenizers

tokenizers: list['LexicalTokenizer']

vectorSearch

vectorSearch: VectorSearch | None