SearchIndex Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. SearchIndex
- com.
Implements
public final class SearchIndex
implements JsonSerializable<SearchIndex>
Represents a search index definition, which describes the fields and search behavior of an index.
Constructor Summary
Constructor | Description |
---|---|
SearchIndex(String name) |
Creates an instance of Search |
SearchIndex(String name, List<SearchField> fields) |
Constructor of SearchIndex. |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Search |
fromJson(JsonReader jsonReader)
Reads an instance of Search |
List<Lexical |
getAnalyzers()
Get the analyzers property: The analyzers for the index. |
List<Char |
getCharFilters()
Get the char |
Cors |
getCorsOptions()
Get the cors |
String |
getDefaultScoringProfile()
Get the default |
String |
getETag()
Get the e |
Search |
getEncryptionKey()
Get the encryption |
List<Search |
getFields()
Get the fields property: The fields of the index. |
String |
getName()
Get the name property: The name of the index. |
List<Scoring |
getScoringProfiles()
Get the scoring |
Semantic |
getSemanticSearch()
Get the semantic |
Similarity |
getSimilarity()
Get the similarity property: The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. |
List<Search |
getSuggesters()
Get the suggesters property: The suggesters for the index. |
List<Token |
getTokenFilters()
Get the token |
List<Lexical |
getTokenizers()
Get the tokenizers property: The tokenizers for the index. |
Vector |
getVectorSearch()
Get the vector |
Search |
setAnalyzers(LexicalAnalyzer[] analyzers)
Set the analyzers property: The analyzers for the index. |
Search |
setAnalyzers(List<LexicalAnalyzer> analyzers)
Set the analyzers property: The analyzers for the index. |
Search |
setCharFilters(CharFilter[] charFilters)
Set the char |
Search |
setCharFilters(List<CharFilter> charFilters)
Set the char |
Search |
setCorsOptions(CorsOptions corsOptions)
Set the cors |
Search |
setDefaultScoringProfile(String defaultScoringProfile)
Set the default |
Search |
setETag(String eTag)
Set the e |
Search |
setEncryptionKey(SearchResourceEncryptionKey encryptionKey)
Set the encryption |
Search |
setFields(SearchField[] fields)
Set the fields property: The fields of the index. |
Search |
setFields(List<SearchField> fields)
Set the fields property: The fields of the index. |
Search |
setScoringProfiles(ScoringProfile[] scoringProfiles)
Set the scoring |
Search |
setScoringProfiles(List<ScoringProfile> scoringProfiles)
Set the scoring |
Search |
setSemanticSearch(SemanticSearch semanticSearch)
Set the semantic |
Search |
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. |
Search |
setSuggesters(SearchSuggester[] suggesters)
Set the suggesters property: The suggesters for the index. |
Search |
setSuggesters(List<SearchSuggester> suggesters)
Set the suggesters property: The suggesters for the index. |
Search |
setTokenFilters(TokenFilter[] tokenFilters)
Set the token |
Search |
setTokenFilters(List<TokenFilter> tokenFilters)
Set the token |
Search |
setTokenizers(LexicalTokenizer[] tokenizers)
Set the tokenizers property: The tokenizers for the index. |
Search |
setTokenizers(List<LexicalTokenizer> tokenizers)
Set the tokenizers property: The tokenizers for the index. |
Search |
setVectorSearch(VectorSearch vectorSearch)
Set the vector |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
SearchIndex
public SearchIndex(String name)
Creates an instance of SearchIndex class.
Parameters:
SearchIndex
public SearchIndex(String name, List
Constructor of SearchIndex.
Parameters:
Method Details
fromJson
public static SearchIndex fromJson(JsonReader jsonReader)
Reads an instance of SearchIndex from the JsonReader.
Parameters:
Returns:
Throws:
getAnalyzers
public List
Get the analyzers property: The analyzers for the index.
Returns:
getCharFilters
public List
Get the charFilters property: The character filters for the index.
Returns:
getCorsOptions
public CorsOptions getCorsOptions()
Get the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the index.
Returns:
getDefaultScoringProfile
public String 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:
getETag
public String getETag()
Get the eTag property: The ETag of the index.
Returns:
getEncryptionKey
public SearchResourceEncryptionKey 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:
getFields
public List
Get the fields property: The fields of the index.
Returns:
getName
public String getName()
Get the name property: The name of the index.
Returns:
getScoringProfiles
public List
Get the scoringProfiles property: The scoring profiles for the index.
Returns:
getSemanticSearch
public SemanticSearch getSemanticSearch()
Get the semanticSearch property: Defines parameters for a search index that influence semantic capabilities.
Returns:
getSimilarity
public SimilarityAlgorithm 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:
getSuggesters
public List
Get the suggesters property: The suggesters for the index.
Returns:
getTokenFilters
public List
Get the tokenFilters property: The token filters for the index.
Returns:
getTokenizers
public List
Get the tokenizers property: The tokenizers for the index.
Returns:
getVectorSearch
public VectorSearch getVectorSearch()
Get the vectorSearch property: Contains configuration options related to vector search.
Returns:
setAnalyzers
public SearchIndex setAnalyzers(LexicalAnalyzer[] analyzers)
Set the analyzers property: The analyzers for the index.
Parameters:
Returns:
setAnalyzers
public SearchIndex setAnalyzers(List
Set the analyzers property: The analyzers for the index.
Parameters:
Returns:
setCharFilters
public SearchIndex setCharFilters(CharFilter[] charFilters)
Set the charFilters property: The character filters for the index.
Parameters:
Returns:
setCharFilters
public SearchIndex setCharFilters(List
Set the charFilters property: The character filters for the index.
Parameters:
Returns:
setCorsOptions
public SearchIndex setCorsOptions(CorsOptions corsOptions)
Set the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the index.
Parameters:
Returns:
setDefaultScoringProfile
public SearchIndex setDefaultScoringProfile(String defaultScoringProfile)
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:
Returns:
setETag
public SearchIndex setETag(String eTag)
Set the eTag property: The ETag of the index.
Parameters:
Returns:
setEncryptionKey
public SearchIndex setEncryptionKey(SearchResourceEncryptionKey encryptionKey)
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:
Returns:
setFields
public SearchIndex setFields(SearchField[] fields)
Set the fields property: The fields of the index.
Parameters:
Returns:
setFields
public SearchIndex setFields(List
Set the fields property: The fields of the index.
Parameters:
Returns:
setScoringProfiles
public SearchIndex setScoringProfiles(ScoringProfile[] scoringProfiles)
Set the scoringProfiles property: The scoring profiles for the index.
Parameters:
Returns:
setScoringProfiles
public SearchIndex setScoringProfiles(List
Set the scoringProfiles property: The scoring profiles for the index.
Parameters:
Returns:
setSemanticSearch
public SearchIndex setSemanticSearch(SemanticSearch semanticSearch)
Set the semanticSearch property: Defines parameters for a search index that influence semantic capabilities.
Parameters:
Returns:
setSimilarity
public SearchIndex 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. 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:
Returns:
setSuggesters
public SearchIndex setSuggesters(SearchSuggester[] suggesters)
Set the suggesters property: The suggesters for the index.
Parameters:
Returns:
setSuggesters
public SearchIndex setSuggesters(List
Set the suggesters property: The suggesters for the index.
Parameters:
Returns:
setTokenFilters
public SearchIndex setTokenFilters(TokenFilter[] tokenFilters)
Set the tokenFilters property: The token filters for the index.
Parameters:
Returns:
setTokenFilters
public SearchIndex setTokenFilters(List
Set the tokenFilters property: The token filters for the index.
Parameters:
Returns:
setTokenizers
public SearchIndex setTokenizers(LexicalTokenizer[] tokenizers)
Set the tokenizers property: The tokenizers for the index.
Parameters:
Returns:
setTokenizers
public SearchIndex setTokenizers(List
Set the tokenizers property: The tokenizers for the index.
Parameters:
Returns:
setVectorSearch
public SearchIndex setVectorSearch(VectorSearch vectorSearch)
Set the vectorSearch property: Contains configuration options related to vector search.
Parameters:
Returns:
toJson
Applies to
Azure SDK for Java