Class SearchIndex
java.lang.Object
com.azure.search.documents.indexes.models.SearchIndex
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SearchIndex>
public final class SearchIndex
extends Object
implements com.azure.json.JsonSerializable<SearchIndex>
Represents a search index definition, which describes the fields and search behavior of an index.
-
Constructor Summary
ConstructorsConstructorDescriptionSearchIndex(String name) Creates an instance of SearchIndex class.SearchIndex(String name, List<SearchField> fields) Constructor ofSearchIndex. -
Method Summary
Modifier and TypeMethodDescriptionstatic SearchIndexfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SearchIndex from the JsonReader.Get 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 semanticSearch 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.Get the vectorSearch property: Contains configuration options related to vector search.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(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.setSemanticSearch(SemanticSearch semanticSearch) Set the semanticSearch 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.setVectorSearch(VectorSearch vectorSearch) Set the vectorSearch property: Contains configuration options related to vector search.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SearchIndex
Creates an instance of SearchIndex class.- Parameters:
name- the name value to set.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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. 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.- 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. 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.- 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.
-
getSemanticSearch
Get the semanticSearch property: Defines parameters for a search index that influence semantic capabilities.- Returns:
- the semanticSearch value.
-
setSemanticSearch
Set the semanticSearch property: Defines parameters for a search index that influence semantic capabilities.- Parameters:
semanticSearch- the semanticSearch value to set.- Returns:
- the SearchIndex object itself.
-
getVectorSearch
Get the vectorSearch property: Contains configuration options related to vector search.- Returns:
- the vectorSearch value.
-
setVectorSearch
Set the vectorSearch property: Contains configuration options related to vector search.- Parameters:
vectorSearch- the vectorSearch 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.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SearchIndex>- Throws:
IOException
-
fromJson
Reads an instance of SearchIndex from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SearchIndex if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the SearchIndex.
-
setFields
Set the fields property: The fields of the index.- Parameters:
fields- the fields 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.
-
setSuggesters
Set the suggesters property: The suggesters for the index.- Parameters:
suggesters- the suggesters 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.
-
setTokenizers
Set the tokenizers property: The tokenizers for the index.- Parameters:
tokenizers- the tokenizers 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.
-
setCharFilters
Set the charFilters property: The character filters for the index.- Parameters:
charFilters- the charFilters value to set.- Returns:
- the SearchIndex object itself.
-