Class SearchIndex
java.lang.Object
com.azure.search.documents.indexes.models.SearchIndex
Represents a search index definition, which describes the fields and search
behavior of an index.
-
Constructor Summary
ConstructorsConstructorDescriptionSearchIndex
(String name) Constructor ofSearchIndex
.SearchIndex
(String name, List<SearchField> fields) Constructor ofSearchIndex
. -
Method Summary
Modifier and TypeMethodDescriptionGet the analyzers property: The analyzers for the index.Get the charFilters property: The character filters for the index.Get the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the index.Get the defaultScoringProfile property: The name of the scoring profile to use if none is specified in the query.Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.getETag()
Get the eTag property: The ETag of the index.Get the fields property: The fields of the index.getName()
Get the name property: The name of the index.Get the normalizers property: The normalizers for the index.Get the scoringProfiles property: The scoring profiles for the index.Get the semanticSettings property: Defines parameters for a search index that influence semantic capabilities.Get the similarity property: The type of similarity algorithm to be used when scoring and ranking the documents matching a search query.Get the suggesters property: The suggesters for the index.Get the tokenFilters property: The token filters for the index.Get the tokenizers property: The tokenizers for the index.setAnalyzers
(LexicalAnalyzer... analyzers) Set the analyzers property: The analyzers for the index.setAnalyzers
(List<LexicalAnalyzer> analyzers) Set the analyzers property: The analyzers for the index.setCharFilters
(CharFilter... charFilters) Set the charFilters property: The character filters for the index.setCharFilters
(List<CharFilter> charFilters) Set the charFilters property: The character filters for the index.setCorsOptions
(CorsOptions corsOptions) Set the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the index.setDefaultScoringProfile
(String defaultScoringProfile) Set the defaultScoringProfile property: The name of the scoring profile to use if none is specified in the query.setEncryptionKey
(SearchResourceEncryptionKey encryptionKey) Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.Set the eTag property: The ETag of the index.setFields
(SearchField... fields) Set the fields property: The fields of the index.setFields
(List<SearchField> fields) Set the fields property: The fields of the index.setNormalizers
(LexicalNormalizer... normalizers) Set the normalizers property: The normalizers for the index.setNormalizers
(List<LexicalNormalizer> normalizers) Set the normalizers property: The normalizers for the index.setScoringProfiles
(ScoringProfile... scoringProfiles) Set the scoringProfiles property: The scoring profiles for the index.setScoringProfiles
(List<ScoringProfile> scoringProfiles) Set the scoringProfiles property: The scoring profiles for the index.setSemanticSettings
(SemanticSettings semanticSettings) Set the semanticSettings property: Defines parameters for a search index that influence semantic capabilities.setSimilarity
(SimilarityAlgorithm similarity) Set the similarity property: The type of similarity algorithm to be used when scoring and ranking the documents matching a search query.setSuggesters
(SearchSuggester... suggesters) Set the suggesters property: The suggesters for the index.setSuggesters
(List<SearchSuggester> suggesters) Set the suggesters property: The suggesters for the index.setTokenFilters
(TokenFilter... tokenFilters) Set the tokenFilters property: The token filters for the index.setTokenFilters
(List<TokenFilter> tokenFilters) Set the tokenFilters property: The token filters for the index.setTokenizers
(LexicalTokenizer... tokenizers) Set the tokenizers property: The tokenizers for the index.setTokenizers
(List<LexicalTokenizer> tokenizers) Set the tokenizers property: The tokenizers for the index.
-
Constructor Details
-
SearchIndex
Constructor ofSearchIndex
.- Parameters:
name
- The name of the index.
-
SearchIndex
Constructor ofSearchIndex
.- Parameters:
name
- The name of the index.fields
- The fields of the index.
-
-
Method Details
-
getName
Get the name property: The name of the index.- Returns:
- the name value.
-
getFields
Get the fields property: The fields of the index.- Returns:
- the fields value.
-
setFields
Set the fields property: The fields of the index.- Parameters:
fields
- the fields value to set.- Returns:
- the SearchIndex object itself.
-
setFields
Set the fields property: The fields of the index.- Parameters:
fields
- the fields value to set.- Returns:
- the SearchIndex object itself.
-
getScoringProfiles
Get the scoringProfiles property: The scoring profiles for the index.- Returns:
- the scoringProfiles value.
-
setScoringProfiles
Set the scoringProfiles property: The scoring profiles for the index.- Parameters:
scoringProfiles
- the scoringProfiles value to set.- Returns:
- the SearchIndex object itself.
-
setScoringProfiles
Set the scoringProfiles property: The scoring profiles for the index.- Parameters:
scoringProfiles
- the scoringProfiles value to set.- Returns:
- the SearchIndex object itself.
-
getDefaultScoringProfile
Get the defaultScoringProfile property: 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.- Returns:
- the defaultScoringProfile value.
-
setDefaultScoringProfile
Set the defaultScoringProfile property: 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.- Parameters:
defaultScoringProfile
- the defaultScoringProfile value to set.- Returns:
- the SearchIndex object itself.
-
getCorsOptions
Get the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the index.- Returns:
- the corsOptions value.
-
setCorsOptions
Set the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the index.- Parameters:
corsOptions
- the corsOptions value to set.- Returns:
- the SearchIndex object itself.
-
getSuggesters
Get the suggesters property: The suggesters for the index.- Returns:
- the suggesters value.
-
setSuggesters
Set the suggesters property: The suggesters for the index.- Parameters:
suggesters
- the suggesters value to set.- Returns:
- the SearchIndex object itself.
-
setSuggesters
Set the suggesters property: The suggesters for the index.- Parameters:
suggesters
- the suggesters value to set.- Returns:
- the SearchIndex object itself.
-
getAnalyzers
Get the analyzers property: The analyzers for the index.- Returns:
- the analyzers value.
-
setAnalyzers
Set the analyzers property: The analyzers for the index.- Parameters:
analyzers
- the analyzers value to set.- Returns:
- the SearchIndex object itself.
-
setAnalyzers
Set the analyzers property: The analyzers for the index.- Parameters:
analyzers
- the analyzers value to set.- Returns:
- the SearchIndex object itself.
-
getTokenizers
Get the tokenizers property: The tokenizers for the index.- Returns:
- the tokenizers value.
-
setTokenizers
Set the tokenizers property: The tokenizers for the index.- Parameters:
tokenizers
- the tokenizers value to set.- Returns:
- the SearchIndex object itself.
-
setTokenizers
Set the tokenizers property: The tokenizers for the index.- Parameters:
tokenizers
- the tokenizers value to set.- Returns:
- the SearchIndex object itself.
-
getTokenFilters
Get the tokenFilters property: The token filters for the index.- Returns:
- the tokenFilters value.
-
setTokenFilters
Set the tokenFilters property: The token filters for the index.- Parameters:
tokenFilters
- the tokenFilters value to set.- Returns:
- the SearchIndex object itself.
-
setTokenFilters
Set the tokenFilters property: The token filters for the index.- Parameters:
tokenFilters
- the tokenFilters value to set.- Returns:
- the SearchIndex object itself.
-
getCharFilters
Get the charFilters property: The character filters for the index.- Returns:
- the charFilters value.
-
setCharFilters
Set the charFilters property: The character filters for the index.- Parameters:
charFilters
- the charFilters value to set.- Returns:
- the SearchIndex object itself.
-
setCharFilters
Set the charFilters property: The character filters for the index.- Parameters:
charFilters
- the charFilters value to set.- Returns:
- the SearchIndex object itself.
-
getNormalizers
Get the normalizers property: The normalizers for the index.- Returns:
- the normalizers value.
-
setNormalizers
Set the normalizers property: The normalizers for the index.- Parameters:
normalizers
- the normalizers value to set.- Returns:
- the SearchIndex object itself.
-
setNormalizers
Set the normalizers property: The normalizers for the index.- Parameters:
normalizers
- the normalizers value to set.- Returns:
- the SearchIndex object itself.
-
getEncryptionKey
Get the encryptionKey property: 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.- Returns:
- the encryptionKey value.
-
setEncryptionKey
Set the encryptionKey property: 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.- Parameters:
encryptionKey
- the encryptionKey value to set.- Returns:
- the SearchIndex object itself.
-
getSimilarity
Get the similarity property: 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.- Returns:
- the similarity value.
-
setSimilarity
Set the similarity property: 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.- Parameters:
similarity
- the similarity value to set.- Returns:
- the SearchIndex object itself.
-
getSemanticSettings
Get the semanticSettings property: Defines parameters for a search index that influence semantic capabilities.- Returns:
- the semanticSettings value.
-
setSemanticSettings
Set the semanticSettings property: Defines parameters for a search index that influence semantic capabilities.- Parameters:
semanticSettings
- the semanticSettings value to set.- Returns:
- the SearchIndex object itself.
-
getETag
Get the eTag property: The ETag of the index.- Returns:
- the eTag value.
-
setETag
Set the eTag property: The ETag of the index.- Parameters:
eTag
- the eTag value to set.- Returns:
- the SearchIndex object itself.
-