次の方法で共有


SearchIndex Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.SearchIndex

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 SearchIndex class.

SearchIndex(String name, List<SearchField> fields)

Constructor of SearchIndex.

Method Summary

Modifier and Type Method and Description
static SearchIndex fromJson(JsonReader jsonReader)

Reads an instance of SearchIndex from the JsonReader.

List<LexicalAnalyzer> getAnalyzers()

Get the analyzers property: The analyzers for the index.

List<CharFilter> getCharFilters()

Get the charFilters property: The character filters for the index.

CorsOptions getCorsOptions()

Get the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the index.

String getDefaultScoringProfile()

Get the defaultScoringProfile property: The name of the scoring profile to use if none is specified in the query.

String getETag()

Get the eTag property: The ETag of the index.

SearchResourceEncryptionKey getEncryptionKey()

Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

List<SearchField> getFields()

Get the fields property: The fields of the index.

String getName()

Get the name property: The name of the index.

List<ScoringProfile> getScoringProfiles()

Get the scoringProfiles property: The scoring profiles for the index.

SemanticSearch getSemanticSearch()

Get the semanticSearch property: Defines parameters for a search index that influence semantic capabilities.

SimilarityAlgorithm getSimilarity()

Get the similarity property: The type of similarity algorithm to be used when scoring and ranking the documents matching a search query.

List<SearchSuggester> getSuggesters()

Get the suggesters property: The suggesters for the index.

List<TokenFilter> getTokenFilters()

Get the tokenFilters property: The token filters for the index.

List<LexicalTokenizer> getTokenizers()

Get the tokenizers property: The tokenizers for the index.

VectorSearch getVectorSearch()

Get the vectorSearch property: Contains configuration options related to vector search.

SearchIndex setAnalyzers(LexicalAnalyzer[] analyzers)

Set the analyzers property: The analyzers for the index.

SearchIndex setAnalyzers(List<LexicalAnalyzer> analyzers)

Set the analyzers property: The analyzers for the index.

SearchIndex setCharFilters(CharFilter[] charFilters)

Set the charFilters property: The character filters for the index.

SearchIndex setCharFilters(List<CharFilter> charFilters)

Set the charFilters property: The character filters for the index.

SearchIndex setCorsOptions(CorsOptions corsOptions)

Set the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the index.

SearchIndex setDefaultScoringProfile(String defaultScoringProfile)

Set the defaultScoringProfile property: The name of the scoring profile to use if none is specified in the query.

SearchIndex setETag(String eTag)

Set the eTag property: The ETag of the index.

SearchIndex setEncryptionKey(SearchResourceEncryptionKey encryptionKey)

Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

SearchIndex setFields(SearchField[] fields)

Set the fields property: The fields of the index.

SearchIndex setFields(List<SearchField> fields)

Set the fields property: The fields of the index.

SearchIndex setScoringProfiles(ScoringProfile[] scoringProfiles)

Set the scoringProfiles property: The scoring profiles for the index.

SearchIndex setScoringProfiles(List<ScoringProfile> scoringProfiles)

Set the scoringProfiles property: The scoring profiles for the index.

SearchIndex setSemanticSearch(SemanticSearch semanticSearch)

Set the semanticSearch property: Defines parameters for a search index that influence semantic capabilities.

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.

SearchIndex setSuggesters(SearchSuggester[] suggesters)

Set the suggesters property: The suggesters for the index.

SearchIndex setSuggesters(List<SearchSuggester> suggesters)

Set the suggesters property: The suggesters for the index.

SearchIndex setTokenFilters(TokenFilter[] tokenFilters)

Set the tokenFilters property: The token filters for the index.

SearchIndex setTokenFilters(List<TokenFilter> tokenFilters)

Set the tokenFilters property: The token filters for the index.

SearchIndex setTokenizers(LexicalTokenizer[] tokenizers)

Set the tokenizers property: The tokenizers for the index.

SearchIndex setTokenizers(List<LexicalTokenizer> tokenizers)

Set the tokenizers property: The tokenizers for the index.

SearchIndex setVectorSearch(VectorSearch vectorSearch)

Set the vectorSearch property: Contains configuration options related to vector search.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

SearchIndex

public SearchIndex(String name)

Creates an instance of SearchIndex class.

Parameters:

name - the name value to set.

SearchIndex

public SearchIndex(String name, List fields)

Constructor of SearchIndex.

Parameters:

name - The name of the index.
fields - The fields of the index.

Method Details

fromJson

public static SearchIndex fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

getAnalyzers

public List getAnalyzers()

Get the analyzers property: The analyzers for the index.

Returns:

the analyzers value.

getCharFilters

public List getCharFilters()

Get the charFilters property: The character filters for the index.

Returns:

the charFilters value.

getCorsOptions

public CorsOptions getCorsOptions()

Get the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the index.

Returns:

the corsOptions value.

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:

the defaultScoringProfile value.

getETag

public String getETag()

Get the eTag property: The ETag of the index.

Returns:

the eTag value.

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:

the encryptionKey value.

getFields

public List getFields()

Get the fields property: The fields of the index.

Returns:

the fields value.

getName

public String getName()

Get the name property: The name of the index.

Returns:

the name value.

getScoringProfiles

public List getScoringProfiles()

Get the scoringProfiles property: The scoring profiles for the index.

Returns:

the scoringProfiles value.

getSemanticSearch

public SemanticSearch getSemanticSearch()

Get the semanticSearch property: Defines parameters for a search index that influence semantic capabilities.

Returns:

the semanticSearch value.

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:

the similarity value.

getSuggesters

public List getSuggesters()

Get the suggesters property: The suggesters for the index.

Returns:

the suggesters value.

getTokenFilters

public List getTokenFilters()

Get the tokenFilters property: The token filters for the index.

Returns:

the tokenFilters value.

getTokenizers

public List getTokenizers()

Get the tokenizers property: The tokenizers for the index.

Returns:

the tokenizers value.

getVectorSearch

public VectorSearch getVectorSearch()

Get the vectorSearch property: Contains configuration options related to vector search.

Returns:

the vectorSearch value.

setAnalyzers

public SearchIndex setAnalyzers(LexicalAnalyzer[] analyzers)

Set the analyzers property: The analyzers for the index.

Parameters:

analyzers - the analyzers value to set.

Returns:

the SearchIndex object itself.

setAnalyzers

public SearchIndex setAnalyzers(List analyzers)

Set the analyzers property: The analyzers for the index.

Parameters:

analyzers - the analyzers value to set.

Returns:

the SearchIndex object itself.

setCharFilters

public SearchIndex setCharFilters(CharFilter[] charFilters)

Set the charFilters property: The character filters for the index.

Parameters:

charFilters - the charFilters value to set.

Returns:

the SearchIndex object itself.

setCharFilters

public SearchIndex setCharFilters(List charFilters)

Set the charFilters property: The character filters for the index.

Parameters:

charFilters - the charFilters value to set.

Returns:

the SearchIndex object itself.

setCorsOptions

public SearchIndex setCorsOptions(CorsOptions corsOptions)

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.

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:

defaultScoringProfile - the defaultScoringProfile value to set.

Returns:

the SearchIndex object itself.

setETag

public SearchIndex setETag(String eTag)

Set the eTag property: The ETag of the index.

Parameters:

eTag - the eTag value to set.

Returns:

the SearchIndex object itself.

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:

encryptionKey - the encryptionKey value to set.

Returns:

the SearchIndex object itself.

setFields

public SearchIndex setFields(SearchField[] fields)

Set the fields property: The fields of the index.

Parameters:

fields - the fields value to set.

Returns:

the SearchIndex object itself.

setFields

public SearchIndex setFields(List fields)

Set the fields property: The fields of the index.

Parameters:

fields - the fields value to set.

Returns:

the SearchIndex object itself.

setScoringProfiles

public SearchIndex setScoringProfiles(ScoringProfile[] scoringProfiles)

Set the scoringProfiles property: The scoring profiles for the index.

Parameters:

scoringProfiles - the scoringProfiles value to set.

Returns:

the SearchIndex object itself.

setScoringProfiles

public SearchIndex setScoringProfiles(List scoringProfiles)

Set the scoringProfiles property: The scoring profiles for the index.

Parameters:

scoringProfiles - the scoringProfiles value to set.

Returns:

the SearchIndex object itself.

setSemanticSearch

public SearchIndex setSemanticSearch(SemanticSearch semanticSearch)

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.

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:

similarity - the similarity value to set.

Returns:

the SearchIndex object itself.

setSuggesters

public SearchIndex setSuggesters(SearchSuggester[] suggesters)

Set the suggesters property: The suggesters for the index.

Parameters:

suggesters - the suggesters value to set.

Returns:

the SearchIndex object itself.

setSuggesters

public SearchIndex setSuggesters(List suggesters)

Set the suggesters property: The suggesters for the index.

Parameters:

suggesters - the suggesters value to set.

Returns:

the SearchIndex object itself.

setTokenFilters

public SearchIndex setTokenFilters(TokenFilter[] tokenFilters)

Set the tokenFilters property: The token filters for the index.

Parameters:

tokenFilters - the tokenFilters value to set.

Returns:

the SearchIndex object itself.

setTokenFilters

public SearchIndex setTokenFilters(List tokenFilters)

Set the tokenFilters property: The token filters for the index.

Parameters:

tokenFilters - the tokenFilters value to set.

Returns:

the SearchIndex object itself.

setTokenizers

public SearchIndex setTokenizers(LexicalTokenizer[] tokenizers)

Set the tokenizers property: The tokenizers for the index.

Parameters:

tokenizers - the tokenizers value to set.

Returns:

the SearchIndex object itself.

setTokenizers

public SearchIndex setTokenizers(List tokenizers)

Set the tokenizers property: The tokenizers for the index.

Parameters:

tokenizers - the tokenizers value to set.

Returns:

the SearchIndex object itself.

setVectorSearch

public SearchIndex setVectorSearch(VectorSearch vectorSearch)

Set the vectorSearch property: Contains configuration options related to vector search.

Parameters:

vectorSearch - the vectorSearch value to set.

Returns:

the SearchIndex object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to