SearchIndexAsyncClient Class

  • java.lang.Object
    • com.azure.search.documents.indexes.SearchIndexAsyncClient

public final class SearchIndexAsyncClient

Initializes a new instance of the asynchronous SearchIndexClient type.

Method Summary

Modifier and Type Method and Description
Mono<AnalyzeResult> analyzeText(String name, AnalyzeTextOptions request)

Shows how an analyzer breaks text into tokens.

static List<SearchField> buildSearchFields(Class<?> model)

Convenience method to convert a Class's Fields and Methods annotated with either BasicField or ComplexField into SearchField to help aid the creation of a SearchField which represents the Class.

Mono<SearchAlias> createAlias(SearchAlias alias)

Creates a new search alias.

Mono<Response<SearchAlias>> createAliasWithResponse(SearchAlias alias, RequestOptions requestOptions)

Creates a new search alias.

Mono<SearchIndex> createIndex(SearchIndex index)

Creates a new search index.

Mono<Response<SearchIndex>> createIndexWithResponse(SearchIndex index, RequestOptions requestOptions)

Creates a new search index.

Mono<KnowledgeBase> createKnowledgeBase(KnowledgeBase knowledgeBase)

Creates a new knowledge base.

Mono<Response<KnowledgeBase>> createKnowledgeBaseWithResponse(KnowledgeBase knowledgeBase, RequestOptions requestOptions)

Creates a new knowledge base.

Mono<KnowledgeSource> createKnowledgeSource(KnowledgeSource knowledgeSource)

Creates a new knowledge source.

Mono<Response<KnowledgeSource>> createKnowledgeSourceWithResponse(KnowledgeSource knowledgeSource, RequestOptions requestOptions)

Creates a new knowledge source.

Mono<SearchAlias> createOrUpdateAlias(SearchAlias alias)

Creates a new search alias or updates an alias if it already exists.

Mono<Response<SearchAlias>> createOrUpdateAliasWithResponse(SearchAlias alias, RequestOptions requestOptions)

Creates a new search alias or updates an alias if it already exists.

Mono<SearchIndex> createOrUpdateIndex(SearchIndex index)

Creates a new search index or updates an index if it already exists.

Mono<Response<SearchIndex>> createOrUpdateIndexWithResponse(SearchIndex index, RequestOptions requestOptions)

Creates a new search index or updates an index if it already exists.

Mono<KnowledgeSource> createOrUpdateKnowledgeSource(KnowledgeSource knowledgeSource)

Creates a new knowledge source or updates an knowledge source if it already exists.

Mono<SynonymMap> createOrUpdateSynonymMap(SynonymMap synonymMap)

Creates a new synonym map or updates a synonym map if it already exists.

Mono<Response<SynonymMap>> createOrUpdateSynonymMapWithResponse(SynonymMap synonymMap, RequestOptions requestOptions)

Creates a new synonym map or updates a synonym map if it already exists.

Mono<SynonymMap> createSynonymMap(SynonymMap synonymMap)

Creates a new synonym map.

Mono<Response<SynonymMap>> createSynonymMapWithResponse(SynonymMap synonymMap, RequestOptions requestOptions)

Creates a new synonym map.

Mono<Void> deleteAlias(String name)

Deletes a search alias and its associated mapping to an index.

Mono<Void> deleteAlias(String name, MatchConditions matchConditions)

Deletes a search alias and its associated mapping to an index.

Mono<Response<Void>> deleteAliasWithResponse(String name, RequestOptions requestOptions)

Deletes a search alias and its associated mapping to an index.

Mono<Void> deleteIndex(String name)

Deletes a search index and all the documents it contains.

Mono<Void> deleteIndex(String name, MatchConditions matchConditions)

Deletes a search index and all the documents it contains.

Mono<Response<Void>> deleteIndexWithResponse(String name, RequestOptions requestOptions)

Deletes a search index and all the documents it contains.

Mono<Void> deleteKnowledgeBase(String name)

Deletes a knowledge base.

Mono<Void> deleteKnowledgeBase(String name, MatchConditions matchConditions)

Deletes a knowledge base.

Mono<Response<Void>> deleteKnowledgeBaseWithResponse(String name, RequestOptions requestOptions)

Deletes a knowledge base.

Mono<Void> deleteKnowledgeSource(String name)

Deletes an existing knowledge source.

Mono<Void> deleteKnowledgeSource(String name, MatchConditions matchConditions)

Deletes an existing knowledge source.

Mono<Response<Void>> deleteKnowledgeSourceWithResponse(String name, RequestOptions requestOptions)

Deletes an existing knowledge source.

Mono<Void> deleteSynonymMap(String name)

Deletes a synonym map.

Mono<Void> deleteSynonymMap(String name, MatchConditions matchConditions)

Deletes a synonym map.

Mono<Response<Void>> deleteSynonymMapWithResponse(String name, RequestOptions requestOptions)

Deletes a synonym map.

Mono<SearchAlias> getAlias(String name)

Retrieves an alias definition.

Mono<Response<SearchAlias>> getAliasWithResponse(String name, RequestOptions requestOptions)

Retrieves an alias definition.

String getEndpoint()

Gets the endpoint used to communicate with the Azure AI Search service.

Mono<SearchIndex> getIndex(String name)

Retrieves an index definition.

Mono<GetIndexStatisticsResult> getIndexStatistics(String name)

Returns statistics for the given index, including a document count and storage usage.

Mono<Response<GetIndexStatisticsResult>> getIndexStatisticsWithResponse(String name, RequestOptions requestOptions)

Returns statistics for the given index, including a document count and storage usage.

Mono<Response<SearchIndex>> getIndexWithResponse(String name, RequestOptions requestOptions)

Retrieves an index definition.

Mono<KnowledgeBase> getKnowledgeBase(String name)

Retrieves a knowledge base definition.

Mono<Response<KnowledgeBase>> getKnowledgeBaseWithResponse(String name, RequestOptions requestOptions)

Retrieves a knowledge base definition.

Mono<KnowledgeSource> getKnowledgeSource(String name)

Retrieves a knowledge source definition.

Mono<KnowledgeSourceStatus> getKnowledgeSourceStatus(String name)

Retrieves the status of a knowledge source.

Mono<Response<KnowledgeSourceStatus>> getKnowledgeSourceStatusWithResponse(String name, RequestOptions requestOptions)

Retrieves the status of a knowledge source.

Mono<Response<KnowledgeSource>> getKnowledgeSourceWithResponse(String name, RequestOptions requestOptions)

Retrieves a knowledge source definition.

SearchAsyncClient getSearchAsyncClient(String indexName)

Initializes a new SearchAsyncClient using the given index name and the same configuration as the SearchIndexAsyncClient.

Mono<SearchServiceStatistics> getServiceStatistics()

Gets service level statistics for a search service.

Mono<Response<SearchServiceStatistics>> getServiceStatisticsWithResponse(RequestOptions requestOptions)

Gets service level statistics for a search service.

SearchServiceVersion getServiceVersion()

Gets the SearchServiceVersion used to communicate with the Azure AI Search service.

Mono<SynonymMap> getSynonymMap(String name)

Retrieves a synonym map definition.

Mono<Response<SynonymMap>> getSynonymMapWithResponse(String name, RequestOptions requestOptions)

Retrieves a synonym map definition.

PagedFlux<SearchAlias> listAliases()

Lists all aliases available for a search service.

PagedFlux<SearchAlias> listAliases(RequestOptions requestOptions)

Lists all aliases available for a search service.

PagedFlux<SearchIndex> listIndexes()

Lists all indexes available for a search service.

PagedFlux<SearchIndex> listIndexes(RequestOptions requestOptions)

Lists all indexes available for a search service.

PagedFlux<SearchIndexResponse> listIndexesWithSelectedProperties()

Lists all indexes available for a search service.

PagedFlux<SearchIndexResponse> listIndexesWithSelectedProperties(List<String> select)

Lists all indexes available for a search service.

PagedFlux<String> listIndexNames()

Lists the names of all indexes available for a search service.

PagedFlux<KnowledgeBase> listKnowledgeBases()

Lists all knowledge bases available for a search service.

PagedFlux<KnowledgeBase> listKnowledgeBases(RequestOptions requestOptions)

Lists all knowledge bases available for a search service.

PagedFlux<KnowledgeSource> listKnowledgeSources()

Lists all knowledge sources available for a search service.

PagedFlux<KnowledgeSource> listKnowledgeSources(RequestOptions requestOptions)

Lists all knowledge sources available for a search service.

PagedFlux<String> listSynonymMapNames()

Lists the names of all synonym maps available for a search service.

PagedFlux<SynonymMap> listSynonymMaps()

Lists all synonym maps available for a search service.

Methods inherited from java.lang.Object

Method Details

analyzeText

public Mono<AnalyzeResult> analyzeText(String name, AnalyzeTextOptions request)

Shows how an analyzer breaks text into tokens.

Parameters:

name - The name of the index.
request - The text and analyzer or analysis components to test.

Returns:

the result of testing an analyzer on text on successful completion of Mono.

buildSearchFields

public static List<SearchField> buildSearchFields(Class<?> model)

Convenience method to convert a Class's Fields and Methods annotated with either BasicField or ComplexField into SearchField to help aid the creation of a SearchField which represents the Class.

This helper only inspects fields and methods declared by the model, and uses the following rules for creating SearchField:

If the type of the field or return type of the method is an array or Iterable it will be considered a collection(SearchFieldDataType dataType) type. Nested collection(SearchFieldDataType dataType) aren't allowed and will throw an exception, ex. String[][], List>, List, List[], etc.

| Java type                                                                                        | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType"></xref>                                             |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `byte`                                                                                           | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.SBYTE" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#SBYTE"></xref>                                 |
| <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Byte"></xref>                   | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.SBYTE" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#SBYTE"></xref>                                 |
| `boolean`                                                                                        | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.BOOLEAN" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#BOOLEAN"></xref>                             |
| <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Boolean"></xref>                | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.BOOLEAN" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#BOOLEAN"></xref>                             |
| `short`                                                                                          | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.INT16" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#INT16"></xref>                                 |
| <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Short"></xref>                  | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.INT16" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#INT16"></xref>                                 |
| `int`                                                                                            | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.INT32" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#INT32"></xref>                                 |
| <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Integer"></xref>                | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.INT32" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#INT32"></xref>                                 |
| `long`                                                                                           | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.INT64" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#INT64"></xref>                                 |
| <xref uid="java.lang.Long" data-throw-if-not-resolved="false" data-raw-source="Long"></xref>     | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.INT64" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#INT64"></xref>                                 |
| `float`                                                                                          | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.SINGLE" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#SINGLE"></xref>                               |
| <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Float"></xref>                  | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.SINGLE" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#SINGLE"></xref>                               |
| `double`                                                                                         | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.DOUBLE" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#DOUBLE"></xref>                               |
| <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Double"></xref>                 | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.DOUBLE" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#DOUBLE"></xref>                               |
| `char`                                                                                           | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.STRING" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#STRING"></xref>                               |
| <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Character"></xref>              | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.STRING" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#STRING"></xref>                               |
| <xref uid="" data-throw-if-not-resolved="false" data-raw-source="CharSequence"></xref>           | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.STRING" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#STRING"></xref>                               |
| <xref uid="java.lang.String" data-throw-if-not-resolved="false" data-raw-source="String"></xref> | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.STRING" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#STRING"></xref>                               |
| <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Date"></xref>                   | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.DATE_TIME_OFFSET" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#DATE_TIME_OFFSET"></xref>           |
| <xref uid="" data-throw-if-not-resolved="false" data-raw-source="OffsetDateTime"></xref>         | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.DATE_TIME_OFFSET" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#DATE_TIME_OFFSET"></xref>           |
| <xref uid="" data-throw-if-not-resolved="false" data-raw-source="GeoPoint"></xref>               | <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.GEOGRAPHY_POINT" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#GEOGRAPHY_POINT"></xref>             |
| Any other type                                                                                   | Attempted to be consumed as <xref uid="com.azure.search.documents.indexes.models.SearchFieldDataType.COMPLEX" data-throw-if-not-resolved="false" data-raw-source="SearchFieldDataType#COMPLEX"></xref> |

HALF and BYTE aren't supported by Field given there isn't a built-in Java type that represents them.

When generating SearchField there is a maximum class depth limit of 1000 before an exception will be thrown.

This helper method performs a few basic validation on the created SearchField, they are the following:

Parameters:

model - The model Class that will have SearchField generated from its structure.

Returns:

A list SearchField which represent the model Class.

createAlias

public Mono<SearchAlias> createAlias(SearchAlias alias)

Creates a new search alias.

Parameters:

alias - The definition of the alias to create.

Returns:

represents an index alias, which describes a mapping from the alias name to an index on successful completion of Mono.

createAliasWithResponse

public Mono<Response<SearchAlias>> createAliasWithResponse(SearchAlias alias, RequestOptions requestOptions)

Creates a new search alias.

Parameters:

alias - The definition of the alias to create.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents an index alias, which describes a mapping from the alias name to an index along with Response<T> on successful completion of Mono.

createIndex

public Mono<SearchIndex> createIndex(SearchIndex index)

Creates a new search index.

Parameters:

index - The definition of the index to create.

Returns:

represents a search index definition, which describes the fields and search behavior of an index on successful completion of Mono.

createIndexWithResponse

public Mono<Response<SearchIndex>> createIndexWithResponse(SearchIndex index, RequestOptions requestOptions)

Creates a new search index.

Parameters:

index - The definition of the index to create.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents a search index definition, which describes the fields and search behavior of an index along with Response<T> on successful completion of Mono.

createKnowledgeBase

public Mono<KnowledgeBase> createKnowledgeBase(KnowledgeBase knowledgeBase)

Creates a new knowledge base.

Parameters:

knowledgeBase - The definition of the knowledge base to create.

Returns:

represents a knowledge base definition on successful completion of Mono.

createKnowledgeBaseWithResponse

public Mono<Response<KnowledgeBase>> createKnowledgeBaseWithResponse(KnowledgeBase knowledgeBase, RequestOptions requestOptions)

Creates a new knowledge base.

Parameters:

knowledgeBase - The definition of the knowledge base to create.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents a knowledge base definition along with Response<T> on successful completion of Mono.

createKnowledgeSource

public Mono<KnowledgeSource> createKnowledgeSource(KnowledgeSource knowledgeSource)

Creates a new knowledge source.

Parameters:

knowledgeSource - The definition of the knowledge source to create.

Returns:

represents a knowledge source definition on successful completion of Mono.

createKnowledgeSourceWithResponse

public Mono<Response<KnowledgeSource>> createKnowledgeSourceWithResponse(KnowledgeSource knowledgeSource, RequestOptions requestOptions)

Creates a new knowledge source.

Parameters:

knowledgeSource - The definition of the knowledge source to create.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents a knowledge source definition along with Response<T> on successful completion of Mono.

createOrUpdateAlias

public Mono<SearchAlias> createOrUpdateAlias(SearchAlias alias)

Creates a new search alias or updates an alias if it already exists.

Parameters:

alias - The definition of the alias to create or update.

Returns:

represents an index alias, which describes a mapping from the alias name to an index on successful completion of Mono.

createOrUpdateAliasWithResponse

public Mono<Response<SearchAlias>> createOrUpdateAliasWithResponse(SearchAlias alias, RequestOptions requestOptions)

Creates a new search alias or updates an alias if it already exists.

Header Parameters

| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Name          | Type   | Required | Description                                                                                                                    |
| If-Match      | String | No       | Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value.             |
| If-None-Match | String | No       | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |

You can add these to a request with RequestOptions#addHeader

Parameters:

alias - The definition of the alias to create or update.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents an index alias, which describes a mapping from the alias name to an index along with Response<T> on successful completion of Mono.

createOrUpdateIndex

public Mono<SearchIndex> createOrUpdateIndex(SearchIndex index)

Creates a new search index or updates an index if it already exists.

Parameters:

index - The definition of the index to create or update.

Returns:

represents a search index definition, which describes the fields and search behavior of an index on successful completion of Mono.

createOrUpdateIndexWithResponse

public Mono<Response<SearchIndex>> createOrUpdateIndexWithResponse(SearchIndex index, RequestOptions requestOptions)

Creates a new search index or updates an index if it already exists.

Query Parameters

| ------------------ | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name               | Type    | Required | Description                                                                                                                                                                                                                                                                                                                                                     |
| allowIndexDowntime | Boolean | No       | Allows new analyzers, tokenizers, token filters, or char filters to be added to an index by taking the index offline for at least a few seconds. This temporarily causes indexing and query requests to fail. Performance and write availability of the index can be impaired for several minutes after the index is updated, or longer for very large indexes. |

You can add these to a request with RequestOptions#addQueryParam

Header Parameters

| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Name          | Type   | Required | Description                                                                                                                    |
| If-Match      | String | No       | Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value.             |
| If-None-Match | String | No       | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |

You can add these to a request with RequestOptions#addHeader

Parameters:

index - The definition of the index to create or update.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents a search index definition, which describes the fields and search behavior of an index along with Response<T> on successful completion of Mono.

createOrUpdateKnowledgeSource

public Mono<KnowledgeSource> createOrUpdateKnowledgeSource(KnowledgeSource knowledgeSource)

Creates a new knowledge source or updates an knowledge source if it already exists.

Parameters:

knowledgeSource - The definition of the knowledge source to create or update.

Returns:

represents a knowledge source definition on successful completion of Mono.

createOrUpdateSynonymMap

public Mono<SynonymMap> createOrUpdateSynonymMap(SynonymMap synonymMap)

Creates a new synonym map or updates a synonym map if it already exists.

Parameters:

synonymMap - The definition of the synonym map to create or update.

Returns:

represents a synonym map definition on successful completion of Mono.

createOrUpdateSynonymMapWithResponse

public Mono<Response<SynonymMap>> createOrUpdateSynonymMapWithResponse(SynonymMap synonymMap, RequestOptions requestOptions)

Creates a new synonym map or updates a synonym map if it already exists.

Header Parameters

| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Name          | Type   | Required | Description                                                                                                                    |
| If-Match      | String | No       | Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value.             |
| If-None-Match | String | No       | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |

You can add these to a request with RequestOptions#addHeader

Parameters:

synonymMap - The definition of the synonym map to create or update.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents a synonym map definition along with Response<T> on successful completion of Mono.

createSynonymMap

public Mono<SynonymMap> createSynonymMap(SynonymMap synonymMap)

Creates a new synonym map.

Parameters:

synonymMap - The definition of the synonym map to create.

Returns:

represents a synonym map definition on successful completion of Mono.

createSynonymMapWithResponse

public Mono<Response<SynonymMap>> createSynonymMapWithResponse(SynonymMap synonymMap, RequestOptions requestOptions)

Creates a new synonym map.

Parameters:

synonymMap - The definition of the synonym map to create.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents a synonym map definition along with Response<T> on successful completion of Mono.

deleteAlias

public Mono<Void> deleteAlias(String name)

Deletes a search alias and its associated mapping to an index. This operation is permanent, with no recovery option. The mapped index is untouched by this operation.

Parameters:

name - The name of the alias.

Returns:

A Mono that completes when a successful response is received.

deleteAlias

public Mono<Void> deleteAlias(String name, MatchConditions matchConditions)

Deletes a search alias and its associated mapping to an index. This operation is permanent, with no recovery option. The mapped index is untouched by this operation.

Parameters:

name - The name of the alias.
matchConditions - Specifies HTTP options for conditional requests.

Returns:

A Mono that completes when a successful response is received.

deleteAliasWithResponse

public Mono<Response<Void>> deleteAliasWithResponse(String name, RequestOptions requestOptions)

Deletes a search alias and its associated mapping to an index. This operation is permanent, with no recovery option. The mapped index is untouched by this operation.

Header Parameters

| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Name          | Type   | Required | Description                                                                                                                    |
| If-Match      | String | No       | Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value.             |
| If-None-Match | String | No       | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |

You can add these to a request with RequestOptions#addHeader

Parameters:

name - The name of the alias.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the Response<T> on successful completion of Mono.

deleteIndex

public Mono<Void> deleteIndex(String name)

Deletes a search index and all the documents it contains. This operation is permanent, with no recovery option. Make sure you have a master copy of your index definition, data ingestion code, and a backup of the primary data source in case you need to re-build the index.

Parameters:

name - The name of the index.

Returns:

A Mono that completes when a successful response is received.

deleteIndex

public Mono<Void> deleteIndex(String name, MatchConditions matchConditions)

Deletes a search index and all the documents it contains. This operation is permanent, with no recovery option. Make sure you have a master copy of your index definition, data ingestion code, and a backup of the primary data source in case you need to re-build the index.

Parameters:

name - The name of the index.
matchConditions - Specifies HTTP options for conditional requests.

Returns:

A Mono that completes when a successful response is received.

deleteIndexWithResponse

public Mono<Response<Void>> deleteIndexWithResponse(String name, RequestOptions requestOptions)

Deletes a search index and all the documents it contains. This operation is permanent, with no recovery option. Make sure you have a master copy of your index definition, data ingestion code, and a backup of the primary data source in case you need to re-build the index.

Header Parameters

| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Name          | Type   | Required | Description                                                                                                                    |
| If-Match      | String | No       | Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value.             |
| If-None-Match | String | No       | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |

You can add these to a request with RequestOptions#addHeader

Parameters:

name - The name of the index.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the Response<T> on successful completion of Mono.

deleteKnowledgeBase

public Mono<Void> deleteKnowledgeBase(String name)

Deletes a knowledge base.

Parameters:

name - The name of the knowledge base.

Returns:

A Mono that completes when a successful response is received.

deleteKnowledgeBase

public Mono<Void> deleteKnowledgeBase(String name, MatchConditions matchConditions)

Deletes a knowledge base.

Parameters:

name - The name of the knowledge base.
matchConditions - Specifies HTTP options for conditional requests.

Returns:

A Mono that completes when a successful response is received.

deleteKnowledgeBaseWithResponse

public Mono<Response<Void>> deleteKnowledgeBaseWithResponse(String name, RequestOptions requestOptions)

Deletes a knowledge base.

Header Parameters

| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Name          | Type   | Required | Description                                                                                                                    |
| If-Match      | String | No       | Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value.             |
| If-None-Match | String | No       | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |

You can add these to a request with RequestOptions#addHeader

Parameters:

name - The name of the knowledge base.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the Response<T> on successful completion of Mono.

deleteKnowledgeSource

public Mono<Void> deleteKnowledgeSource(String name)

Deletes an existing knowledge source.

Parameters:

name - The name of the knowledge source.

Returns:

A Mono that completes when a successful response is received.

deleteKnowledgeSource

public Mono<Void> deleteKnowledgeSource(String name, MatchConditions matchConditions)

Deletes an existing knowledge source.

Parameters:

name - The name of the knowledge source.
matchConditions - Specifies HTTP options for conditional requests.

Returns:

A Mono that completes when a successful response is received.

deleteKnowledgeSourceWithResponse

public Mono<Response<Void>> deleteKnowledgeSourceWithResponse(String name, RequestOptions requestOptions)

Deletes an existing knowledge source.

Header Parameters

| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Name          | Type   | Required | Description                                                                                                                    |
| If-Match      | String | No       | Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value.             |
| If-None-Match | String | No       | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |

You can add these to a request with RequestOptions#addHeader

Parameters:

name - The name of the knowledge source.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the Response<T> on successful completion of Mono.

deleteSynonymMap

public Mono<Void> deleteSynonymMap(String name)

Deletes a synonym map.

Parameters:

name - The name of the synonym map.

Returns:

A Mono that completes when a successful response is received.

deleteSynonymMap

public Mono<Void> deleteSynonymMap(String name, MatchConditions matchConditions)

Deletes a synonym map.

Parameters:

name - The name of the synonym map.
matchConditions - Specifies HTTP options for conditional requests.

Returns:

A Mono that completes when a successful response is received.

deleteSynonymMapWithResponse

public Mono<Response<Void>> deleteSynonymMapWithResponse(String name, RequestOptions requestOptions)

Deletes a synonym map.

Header Parameters

| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Name          | Type   | Required | Description                                                                                                                    |
| If-Match      | String | No       | Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value.             |
| If-None-Match | String | No       | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |

You can add these to a request with RequestOptions#addHeader

Parameters:

name - The name of the synonym map.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the Response<T> on successful completion of Mono.

getAlias

public Mono<SearchAlias> getAlias(String name)

Retrieves an alias definition.

Parameters:

name - The name of the alias.

Returns:

represents an index alias, which describes a mapping from the alias name to an index on successful completion of Mono.

getAliasWithResponse

public Mono<Response<SearchAlias>> getAliasWithResponse(String name, RequestOptions requestOptions)

Retrieves an alias definition.

Parameters:

name - The name of the alias.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents an index alias, which describes a mapping from the alias name to an index along with Response<T> on successful completion of Mono.

getEndpoint

public String getEndpoint()

Gets the endpoint used to communicate with the Azure AI Search service.

Returns:

The endpoint.

getIndex

public Mono<SearchIndex> getIndex(String name)

Retrieves an index definition.

Parameters:

name - The name of the index.

Returns:

represents a search index definition, which describes the fields and search behavior of an index on successful completion of Mono.

getIndexStatistics

public Mono<GetIndexStatisticsResult> getIndexStatistics(String name)

Returns statistics for the given index, including a document count and storage usage.

Parameters:

name - The name of the index.

Returns:

statistics for a given index on successful completion of Mono.

getIndexStatisticsWithResponse

public Mono<Response<GetIndexStatisticsResult>> getIndexStatisticsWithResponse(String name, RequestOptions requestOptions)

Returns statistics for the given index, including a document count and storage usage.

Parameters:

name - The name of the index.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

statistics for a given index along with Response<T> on successful completion of Mono.

getIndexWithResponse

public Mono<Response<SearchIndex>> getIndexWithResponse(String name, RequestOptions requestOptions)

Retrieves an index definition.

Parameters:

name - The name of the index.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents a search index definition, which describes the fields and search behavior of an index along with Response<T> on successful completion of Mono.

getKnowledgeBase

public Mono<KnowledgeBase> getKnowledgeBase(String name)

Retrieves a knowledge base definition.

Parameters:

name - The name of the knowledge base.

Returns:

represents a knowledge base definition on successful completion of Mono.

getKnowledgeBaseWithResponse

public Mono<Response<KnowledgeBase>> getKnowledgeBaseWithResponse(String name, RequestOptions requestOptions)

Retrieves a knowledge base definition.

Parameters:

name - The name of the knowledge base.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents a knowledge base definition along with Response<T> on successful completion of Mono.

getKnowledgeSource

public Mono<KnowledgeSource> getKnowledgeSource(String name)

Retrieves a knowledge source definition.

Parameters:

name - The name of the knowledge source.

Returns:

represents a knowledge source definition on successful completion of Mono.

getKnowledgeSourceStatus

public Mono<KnowledgeSourceStatus> getKnowledgeSourceStatus(String name)

Retrieves the status of a knowledge source.

Parameters:

name - The name of the knowledge source.

Returns:

represents the status and synchronization history of a knowledge source on successful completion of Mono.

getKnowledgeSourceStatusWithResponse

public Mono<Response<KnowledgeSourceStatus>> getKnowledgeSourceStatusWithResponse(String name, RequestOptions requestOptions)

Retrieves the status of a knowledge source.

Parameters:

name - The name of the knowledge source.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents the status and synchronization history of a knowledge source along with Response<T> on successful completion of Mono.

getKnowledgeSourceWithResponse

public Mono<Response<KnowledgeSource>> getKnowledgeSourceWithResponse(String name, RequestOptions requestOptions)

Retrieves a knowledge source definition.

Parameters:

name - The name of the knowledge source.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents a knowledge source definition along with Response<T> on successful completion of Mono.

getSearchAsyncClient

public SearchAsyncClient getSearchAsyncClient(String indexName)

Initializes a new SearchAsyncClient using the given index name and the same configuration as the SearchIndexAsyncClient.

Parameters:

indexName - the name of the index for the client

Returns:

a SearchAsyncClient created from the SearchIndexAsyncClient configuration

getServiceStatistics

public Mono<SearchServiceStatistics> getServiceStatistics()

Gets service level statistics for a search service.

Returns:

service level statistics for a search service on successful completion of Mono.

getServiceStatisticsWithResponse

public Mono<Response<SearchServiceStatistics>> getServiceStatisticsWithResponse(RequestOptions requestOptions)

Gets service level statistics for a search service.

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

service level statistics for a search service along with Response<T> on successful completion of Mono.

getServiceVersion

public SearchServiceVersion getServiceVersion()

Gets the SearchServiceVersion used to communicate with the Azure AI Search service.

Returns:

The service version.

getSynonymMap

public Mono<SynonymMap> getSynonymMap(String name)

Retrieves a synonym map definition.

Parameters:

name - The name of the synonym map.

Returns:

represents a synonym map definition on successful completion of Mono.

getSynonymMapWithResponse

public Mono<Response<SynonymMap>> getSynonymMapWithResponse(String name, RequestOptions requestOptions)

Retrieves a synonym map definition.

Parameters:

name - The name of the synonym map.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents a synonym map definition along with Response<T> on successful completion of Mono.

listAliases

public PagedFlux<SearchAlias> listAliases()

Lists all aliases available for a search service.

Returns:

response from a List Aliases request as paginated response with PagedFlux<T>.

listAliases

public PagedFlux<SearchAlias> listAliases(RequestOptions requestOptions)

Lists all aliases available for a search service.

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

response from a List Aliases request as paginated response with PagedFlux<T>.

listIndexes

public PagedFlux<SearchIndex> listIndexes()

Lists all indexes available for a search service.

Returns:

response from a List Indexes request as paginated response with PagedFlux<T>.

listIndexes

public PagedFlux<SearchIndex> listIndexes(RequestOptions requestOptions)

Lists all indexes available for a search service.

Query Parameters

| ------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name    | Type         | Required | Description                                                                                                                                                                                                 |
| $select | List<String> | No       | Selects which top-level properties to retrieve. Specified as a comma-separated list of JSON property names, or '\*' for all properties. The default is all properties. In the form of "," separated string. |

You can add these to a request with RequestOptions#addQueryParam

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

response from a List Indexes request as paginated response with PagedFlux<T>.

listIndexesWithSelectedProperties

public PagedFlux<SearchIndexResponse> listIndexesWithSelectedProperties()

Lists all indexes available for a search service.

Returns:

response from a List Indexes request as paginated response with PagedFlux<T>.

listIndexesWithSelectedProperties

public PagedFlux<SearchIndexResponse> listIndexesWithSelectedProperties(List<String> select)

Lists all indexes available for a search service.

Parameters:

select - Selects which top-level properties to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties.

Returns:

response from a List Indexes request as paginated response with PagedFlux<T>.

listIndexNames

public PagedFlux<String> listIndexNames()

Lists the names of all indexes available for a search service.

Returns:

response from a List Indexes request as paginated response with PagedFlux<T>.

listKnowledgeBases

public PagedFlux<KnowledgeBase> listKnowledgeBases()

Lists all knowledge bases available for a search service.

Returns:

result from listing knowledge bases as paginated response with PagedFlux<T>.

listKnowledgeBases

public PagedFlux<KnowledgeBase> listKnowledgeBases(RequestOptions requestOptions)

Lists all knowledge bases available for a search service.

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

result from listing knowledge bases as paginated response with PagedFlux<T>.

listKnowledgeSources

public PagedFlux<KnowledgeSource> listKnowledgeSources()

Lists all knowledge sources available for a search service.

Returns:

result from listing knowledge sources as paginated response with PagedFlux<T>.

listKnowledgeSources

public PagedFlux<KnowledgeSource> listKnowledgeSources(RequestOptions requestOptions)

Lists all knowledge sources available for a search service.

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

result from listing knowledge sources as paginated response with PagedFlux<T>.

listSynonymMapNames

public PagedFlux<String> listSynonymMapNames()

Lists the names of all synonym maps available for a search service.

Returns:

the names of all synonym maps as paginated response with PagedFlux<T>.

listSynonymMaps

public PagedFlux<SynonymMap> listSynonymMaps()

Lists all synonym maps available for a search service.

Returns:

all synonym maps as paginated response with PagedFlux<T>.

Applies to