public class SearchIndexerAsyncClient extends Object
SearchIndexerClientBuilder
Modifier and Type | Method and Description |
---|---|
Mono<SearchIndexerDataSourceConnection> |
createDataSourceConnection(SearchIndexerDataSourceConnection dataSource)
Creates a new Azure Cognitive Search data source
|
Mono<com.azure.core.http.rest.Response<SearchIndexerDataSourceConnection>> |
createDataSourceConnectionWithResponse(SearchIndexerDataSourceConnection dataSource)
Creates a new Azure Cognitive Search data source
|
Mono<SearchIndexer> |
createIndexer(SearchIndexer indexer)
Creates a new Azure Cognitive Search indexer.
|
Mono<com.azure.core.http.rest.Response<SearchIndexer>> |
createIndexerWithResponse(SearchIndexer indexer)
Creates a new Azure Cognitive Search indexer.
|
Mono<SearchIndexerDataSourceConnection> |
createOrUpdateDataSourceConnection(SearchIndexerDataSourceConnection dataSource)
Creates a new Azure Cognitive Search data source or updates a data source if it already exists.
|
Mono<com.azure.core.http.rest.Response<SearchIndexerDataSourceConnection>> |
createOrUpdateDataSourceConnectionWithResponse(CreateOrUpdateDataSourceConnectionOptions options)
Creates a new Azure Cognitive Search data source or updates a data source if it already exists.
|
Mono<com.azure.core.http.rest.Response<SearchIndexerDataSourceConnection>> |
createOrUpdateDataSourceConnectionWithResponse(SearchIndexerDataSourceConnection dataSource,
boolean onlyIfUnchanged)
Creates a new Azure Cognitive Search data source or updates a data source if it already exists.
|
Mono<SearchIndexer> |
createOrUpdateIndexer(SearchIndexer indexer)
Creates a new Azure Cognitive Search indexer or updates an indexer if it already exists.
|
Mono<com.azure.core.http.rest.Response<SearchIndexer>> |
createOrUpdateIndexerWithResponse(CreateOrUpdateIndexerOptions options)
Creates a new Azure Cognitive Search indexer or updates an indexer if it already exists.
|
Mono<com.azure.core.http.rest.Response<SearchIndexer>> |
createOrUpdateIndexerWithResponse(SearchIndexer indexer,
boolean onlyIfUnchanged)
Creates a new Azure Cognitive Search indexer or updates an indexer if it already exists.
|
Mono<SearchIndexerSkillset> |
createOrUpdateSkillset(SearchIndexerSkillset skillset)
Creates a new Azure Cognitive Search skillset or updates a skillset if it already exists.
|
Mono<com.azure.core.http.rest.Response<SearchIndexerSkillset>> |
createOrUpdateSkillsetWithResponse(CreateOrUpdateSkillsetOptions options)
Creates a new Azure Cognitive Search skillset or updates a skillset if it already exists.
|
Mono<com.azure.core.http.rest.Response<SearchIndexerSkillset>> |
createOrUpdateSkillsetWithResponse(SearchIndexerSkillset skillset,
boolean onlyIfUnchanged)
Creates a new Azure Cognitive Search skillset or updates a skillset if it already exists.
|
Mono<SearchIndexerSkillset> |
createSkillset(SearchIndexerSkillset skillset)
Creates a new skillset in an Azure Cognitive Search service.
|
Mono<com.azure.core.http.rest.Response<SearchIndexerSkillset>> |
createSkillsetWithResponse(SearchIndexerSkillset skillset)
Creates a new skillset in an Azure Cognitive Search service.
|
Mono<Void> |
deleteDataSourceConnection(String dataSourceName)
Delete a DataSource
|
Mono<com.azure.core.http.rest.Response<Void>> |
deleteDataSourceConnectionWithResponse(SearchIndexerDataSourceConnection dataSource,
boolean onlyIfUnchanged)
Deletes an Azure Cognitive Search data source.
|
Mono<Void> |
deleteIndexer(String indexerName)
Deletes an Azure Cognitive Search indexer.
|
Mono<com.azure.core.http.rest.Response<Void>> |
deleteIndexerWithResponse(SearchIndexer indexer,
boolean onlyIfUnchanged)
Deletes an Azure Cognitive Search indexer.
|
Mono<Void> |
deleteSkillset(String skillsetName)
Deletes a cognitive skillset in an Azure Cognitive Search service.
|
Mono<com.azure.core.http.rest.Response<Void>> |
deleteSkillsetWithResponse(SearchIndexerSkillset skillset,
boolean onlyIfUnchanged)
Deletes a cognitive skillset in an Azure Cognitive Search service.
|
Mono<SearchIndexerDataSourceConnection> |
getDataSourceConnection(String dataSourceName)
Retrieves a DataSource from an Azure Cognitive Search service.
|
Mono<com.azure.core.http.rest.Response<SearchIndexerDataSourceConnection>> |
getDataSourceConnectionWithResponse(String dataSourceName)
Retrieves a DataSource from an Azure Cognitive Search service.
|
String |
getEndpoint()
Gets the endpoint for the Azure Cognitive Search service.
|
Mono<SearchIndexer> |
getIndexer(String indexerName)
Retrieves an indexer definition.
|
Mono<SearchIndexerStatus> |
getIndexerStatus(String indexerName)
Returns the current status and execution history of an indexer.
|
Mono<com.azure.core.http.rest.Response<SearchIndexerStatus>> |
getIndexerStatusWithResponse(String indexerName)
Returns the current status and execution history of an indexer.
|
Mono<com.azure.core.http.rest.Response<SearchIndexer>> |
getIndexerWithResponse(String indexerName)
Retrieves an indexer definition.
|
Mono<SearchIndexerSkillset> |
getSkillset(String skillsetName)
Retrieves a skillset definition.
|
Mono<com.azure.core.http.rest.Response<SearchIndexerSkillset>> |
getSkillsetWithResponse(String skillsetName)
Retrieves a skillset definition.
|
com.azure.core.http.rest.PagedFlux<String> |
listDataSourceConnectionNames()
List all DataSource names from an Azure Cognitive Search service.
|
com.azure.core.http.rest.PagedFlux<SearchIndexerDataSourceConnection> |
listDataSourceConnections()
List all DataSources from an Azure Cognitive Search service.
|
com.azure.core.http.rest.PagedFlux<String> |
listIndexerNames()
Lists all indexers available for an Azure Cognitive Search service.
|
com.azure.core.http.rest.PagedFlux<SearchIndexer> |
listIndexers()
Lists all indexers available for an Azure Cognitive Search service.
|
com.azure.core.http.rest.PagedFlux<String> |
listSkillsetNames()
Lists all skillset names for an Azure Cognitive Search service.
|
com.azure.core.http.rest.PagedFlux<SearchIndexerSkillset> |
listSkillsets()
Lists all skillsets available for an Azure Cognitive Search service.
|
Mono<Void> |
resetIndexer(String indexerName)
Resets the change tracking state associated with an indexer.
|
Mono<com.azure.core.http.rest.Response<Void>> |
resetIndexerWithResponse(String indexerName)
Resets the change tracking state associated with an indexer.
|
Mono<Void> |
runIndexer(String indexerName)
Runs an indexer on-demand.
|
Mono<com.azure.core.http.rest.Response<Void>> |
runIndexerWithResponse(String indexerName)
Runs an indexer on-demand.
|
public String getEndpoint()
public Mono<SearchIndexerDataSourceConnection> createOrUpdateDataSourceConnection(SearchIndexerDataSourceConnection dataSource)
Code Sample
Create or update search indexer data source connection named "dataSource".
SearchIndexerDataSourceConnection dataSource = searchIndexerClient.getDataSourceConnection("dataSource"); dataSource.setContainer(new SearchIndexerDataContainer("updatecontainer")); SearchIndexerDataSourceConnection updateDataSource = searchIndexerClient.createOrUpdateDataSourceConnection(dataSource); System.out.printf("The dataSource name is %s. The container name of dataSource is %s.%n", updateDataSource.getName(), updateDataSource.getContainer().getName());
dataSource
- The definition of the SearchIndexerDataSourceConnection
to create or update.public Mono<com.azure.core.http.rest.Response<SearchIndexerDataSourceConnection>> createOrUpdateDataSourceConnectionWithResponse(SearchIndexerDataSourceConnection dataSource, boolean onlyIfUnchanged)
Code Sample
Create or update search indexer data source connection named "dataSource".
searchIndexerAsyncClient.getDataSourceConnection("dataSource") .flatMap(dataSource -> { dataSource.setContainer(new SearchIndexerDataContainer("updatecontainer")); return searchIndexerAsyncClient.createOrUpdateDataSourceConnectionWithResponse(dataSource, true); }) .subscribe(updateDataSource -> System.out.printf("The status code of the response is %s.%nThe dataSource name is %s. " + "The container name of dataSource is %s.%n", updateDataSource.getStatusCode(), updateDataSource.getValue().getName(), updateDataSource.getValue().getContainer().getName()));
dataSource
- The definition of the SearchIndexerDataSourceConnection
to create or update.onlyIfUnchanged
- true
to update if the dataSource
is the same as the current service value.
false
to always update existing value.public Mono<com.azure.core.http.rest.Response<SearchIndexerDataSourceConnection>> createOrUpdateDataSourceConnectionWithResponse(CreateOrUpdateDataSourceConnectionOptions options)
Code Sample
Create or update search indexer data source connection named "dataSource".
searchIndexerAsyncClient.getDataSourceConnection("dataSource") .flatMap(dataSource -> { dataSource.setContainer(new SearchIndexerDataContainer("updatecontainer")); return searchIndexerAsyncClient.createOrUpdateDataSourceConnectionWithResponse( new CreateOrUpdateDataSourceConnectionOptions(dataSource) .setOnlyIfUnchanged(true) .setCacheResetRequirementsIgnored(true)); }) .subscribe(updateDataSource -> System.out.printf("The status code of the response is %s.%nThe dataSource name is %s. " + "The container name of dataSource is %s.%n", updateDataSource.getStatusCode(), updateDataSource.getValue().getName(), updateDataSource.getValue().getContainer().getName()));
options
- The options used to create or update the data source
connection
.NullPointerException
- If options
is null.public Mono<SearchIndexerDataSourceConnection> createDataSourceConnection(SearchIndexerDataSourceConnection dataSource)
Code Sample
Create search indexer data source connection named "dataSource".
SearchIndexerDataSourceConnection dataSource = new SearchIndexerDataSourceConnection("dataSource", com.azure.search.documents.indexes.models.SearchIndexerDataSourceType.AZURE_BLOB, "{connectionString}", new com.azure.search.documents.indexes.models.SearchIndexerDataContainer("container")); searchIndexerAsyncClient.createDataSourceConnection(dataSource) .subscribe(dataSourceFromService -> System.out.printf("The data source name is %s. The ETag of data source is %s.%n", dataSourceFromService.getName(), dataSourceFromService.getETag()));
dataSource
- The definition of the dataSource to create.public Mono<com.azure.core.http.rest.Response<SearchIndexerDataSourceConnection>> createDataSourceConnectionWithResponse(SearchIndexerDataSourceConnection dataSource)
Code Sample
Create search indexer data source connection named "dataSource".
SearchIndexerDataSourceConnection dataSource = new SearchIndexerDataSourceConnection("dataSource", SearchIndexerDataSourceType.AZURE_BLOB, "{connectionString}", new SearchIndexerDataContainer("container")); searchIndexerAsyncClient.createDataSourceConnectionWithResponse(dataSource) .subscribe(dataSourceFromService -> System.out.printf("The status code of the response is %s. The data source name is %s.%n", dataSourceFromService.getStatusCode(), dataSourceFromService.getValue().getName()));
dataSource
- The definition of the SearchIndexerDataSourceConnection
to create.public Mono<SearchIndexerDataSourceConnection> getDataSourceConnection(String dataSourceName)
Code Sample
Get search indexer data source connection named "dataSource".
searchIndexerAsyncClient.getDataSourceConnection("dataSource") .subscribe(dataSource -> System.out.printf("The dataSource name is %s. The ETag of dataSource is %s.%n", dataSource.getName(), dataSource.getETag()));
dataSourceName
- the name of the SearchIndexerDataSourceConnection
to retrieve.public Mono<com.azure.core.http.rest.Response<SearchIndexerDataSourceConnection>> getDataSourceConnectionWithResponse(String dataSourceName)
Code Sample
Get search indexer data source connection named "dataSource".
searchIndexerAsyncClient.getDataSourceConnectionWithResponse("dataSource") .subscribe(dataSource -> System.out.printf("The status code of the response is %s. The data source name is %s.%n", dataSource.getStatusCode(), dataSource.getValue().getName()));
dataSourceName
- the name of the SearchIndexerDataSourceConnection
to retrieve.public com.azure.core.http.rest.PagedFlux<SearchIndexerDataSourceConnection> listDataSourceConnections()
Code Sample
List all search indexer data source connections.
searchIndexerAsyncClient.listDataSourceConnections() .subscribe(dataSource -> System.out.printf("The dataSource name is %s. The ETag of dataSource is %s.%n", dataSource.getName(), dataSource.getETag()) );
public com.azure.core.http.rest.PagedFlux<String> listDataSourceConnectionNames()
Code Sample
List all search indexer data source connection names.
searchIndexerAsyncClient.listDataSourceConnectionNames() .subscribe(dataSourceName -> System.out.printf("The dataSource name is %s.%n", dataSourceName));
public Mono<Void> deleteDataSourceConnection(String dataSourceName)
Code Sample
Delete the search indexer data source connection named "dataSource".
searchIndexerAsyncClient.deleteDataSourceConnection("dataSource") .subscribe();
dataSourceName
- the name of the SearchIndexerDataSourceConnection
for deletionpublic Mono<com.azure.core.http.rest.Response<Void>> deleteDataSourceConnectionWithResponse(SearchIndexerDataSourceConnection dataSource, boolean onlyIfUnchanged)
Code Sample
Delete the search indexer data source connection named "dataSource".
searchIndexerAsyncClient.getDataSourceConnection("dataSource") .flatMap(dataSource -> searchIndexerAsyncClient.deleteDataSourceConnectionWithResponse(dataSource, true)) .subscribe(deleteResponse -> System.out.printf("The status code of the response is %d.%n", deleteResponse.getStatusCode()));
dataSource
- The SearchIndexerDataSourceConnection
to delete.onlyIfUnchanged
- true
to delete if the dataSource
is the same as the current service value.
false
to always delete existing value.public Mono<SearchIndexer> createIndexer(SearchIndexer indexer)
Code Sample
Create search indexer named "searchIndexer".
SearchIndexer searchIndexer = new SearchIndexer("searchIndexer", "dataSource", "searchIndex"); searchIndexerAsyncClient.createIndexer(searchIndexer) .subscribe(indexerFromService -> System.out.printf("The indexer name is %s. The ETag of indexer is %s.%n", indexerFromService.getName(), indexerFromService.getETag()));
indexer
- definition of the indexer to create.public Mono<com.azure.core.http.rest.Response<SearchIndexer>> createIndexerWithResponse(SearchIndexer indexer)
Code Sample
Create search indexer named "searchIndexer".
SearchIndexer searchIndexer = new SearchIndexer("searchIndexer", "dataSource", "searchIndex"); searchIndexerAsyncClient.createIndexerWithResponse(searchIndexer) .subscribe(indexerFromServiceResponse -> System.out.printf("The status code of the response is %s. The indexer name is %s.%n", indexerFromServiceResponse.getStatusCode(), indexerFromServiceResponse.getValue().getName()));
indexer
- definition of the indexer to createpublic Mono<SearchIndexer> createOrUpdateIndexer(SearchIndexer indexer)
Code Sample
Create or update search indexer named "searchIndexer".
searchIndexerAsyncClient.getIndexer("searchIndexer") .flatMap(searchIndexerFromService -> { searchIndexerFromService.setFieldMappings(Collections.singletonList( new FieldMapping("hotelName").setTargetFieldName("HotelName"))); return searchIndexerAsyncClient.createOrUpdateIndexer(searchIndexerFromService); }) .subscribe(updatedIndexer -> System.out.printf("The indexer name is %s. The target field name of indexer is %s.%n", updatedIndexer.getName(), updatedIndexer.getFieldMappings().get(0).getTargetFieldName()));
indexer
- The definition of the indexer to create or update.public Mono<com.azure.core.http.rest.Response<SearchIndexer>> createOrUpdateIndexerWithResponse(SearchIndexer indexer, boolean onlyIfUnchanged)
Code Sample
Create or update search indexer named "searchIndexer".
searchIndexerAsyncClient.getIndexer("searchIndexer") .flatMap(searchIndexerFromService -> { searchIndexerFromService.setFieldMappings(Collections.singletonList( new FieldMapping("hotelName").setTargetFieldName("HotelName"))); return searchIndexerAsyncClient.createOrUpdateIndexerWithResponse(searchIndexerFromService, true); }) .subscribe(indexerFromService -> System.out.printf("The status code of the response is %s.%nThe indexer name is %s. " + "The target field name of indexer is %s.%n", indexerFromService.getStatusCode(), indexerFromService.getValue().getName(), indexerFromService.getValue().getFieldMappings().get(0).getTargetFieldName()));
indexer
- the definition of the SearchIndexer
to create or updateonlyIfUnchanged
- true
to update if the indexer
is the same as the current service value.
false
to always update existing value.public Mono<com.azure.core.http.rest.Response<SearchIndexer>> createOrUpdateIndexerWithResponse(CreateOrUpdateIndexerOptions options)
Code Sample
Create or update search indexer named "searchIndexer".
searchIndexerAsyncClient.getIndexer("searchIndexer") .flatMap(searchIndexerFromService -> { searchIndexerFromService.setFieldMappings(Collections.singletonList( new FieldMapping("hotelName").setTargetFieldName("HotelName"))); return searchIndexerAsyncClient.createOrUpdateIndexerWithResponse( new CreateOrUpdateIndexerOptions(searchIndexerFromService) .setOnlyIfUnchanged(true) .setCacheReprocessingChangeDetectionDisabled(false) .setCacheResetRequirementsIgnored(true)); }) .subscribe(indexerFromService -> System.out.printf("The status code of the response is %s.%nThe indexer name is %s. " + "The target field name of indexer is %s.%n", indexerFromService.getStatusCode(), indexerFromService.getValue().getName(), indexerFromService.getValue().getFieldMappings().get(0).getTargetFieldName()));
options
- The options used to create or update the indexer
.NullPointerException
- If options
is null.public Mono<SearchIndexer> getIndexer(String indexerName)
Code Sample
Get search indexer with name "searchIndexer".
searchIndexerAsyncClient.getIndexer("searchIndexer") .subscribe(indexerFromService -> System.out.printf("The indexer name is %s. The ETag of indexer is %s.%n", indexerFromService.getName(), indexerFromService.getETag()));
indexerName
- the name of the indexer to retrievepublic Mono<com.azure.core.http.rest.Response<SearchIndexer>> getIndexerWithResponse(String indexerName)
Code Sample
Get search indexer with name "searchIndexer".
searchIndexerAsyncClient.getIndexerWithResponse("searchIndexer") .subscribe(indexerFromServiceResponse -> System.out.printf("The status code of the response is %s. The indexer name is %s.%n", indexerFromServiceResponse.getStatusCode(), indexerFromServiceResponse.getValue().getName()));
indexerName
- the name of the indexer to retrievepublic com.azure.core.http.rest.PagedFlux<SearchIndexer> listIndexers()
Code Sample
List all search indexers.
searchIndexerAsyncClient.listIndexers() .subscribe(indexer -> System.out.printf("The indexer name is %s. The ETag of indexer is %s.%n", indexer.getName(), indexer.getETag()));
public com.azure.core.http.rest.PagedFlux<String> listIndexerNames()
Code Sample
List all search indexer names.
searchIndexerAsyncClient.listIndexerNames() .subscribe(indexerName -> System.out.printf("The indexer name is %s.%n", indexerName));
public Mono<Void> deleteIndexer(String indexerName)
Code Sample
Delete search indexer named "searchIndexer".
searchIndexerAsyncClient.deleteIndexer("searchIndexer") .subscribe();
indexerName
- the name of the indexer to deletepublic Mono<com.azure.core.http.rest.Response<Void>> deleteIndexerWithResponse(SearchIndexer indexer, boolean onlyIfUnchanged)
Code Sample
Delete search indexer named "searchIndexer".
searchIndexerAsyncClient.getIndexer("searchIndexer") .flatMap(searchIndexer -> searchIndexerAsyncClient.deleteIndexerWithResponse(searchIndexer, true)) .subscribe(deleteResponse -> System.out.printf("The status code of the response is %d.%n", deleteResponse.getStatusCode()));
indexer
- the SearchIndexer
to deleteonlyIfUnchanged
- true
to delete if the indexer
is the same as the current service value.
false
to always delete existing value.public Mono<Void> resetIndexer(String indexerName)
Code Sample
Reset search indexer named "searchIndexer".
searchIndexerAsyncClient.resetIndexer("searchIndexer") .subscribe();
indexerName
- the name of the indexer to resetpublic Mono<com.azure.core.http.rest.Response<Void>> resetIndexerWithResponse(String indexerName)
Code Sample
Reset search indexer named "searchIndexer".
searchIndexerAsyncClient.resetIndexerWithResponse("searchIndexer") .subscribe(response -> System.out.println("The status code of the response is " + response.getStatusCode()));
indexerName
- the name of the indexer to resetpublic Mono<Void> runIndexer(String indexerName)
Code Sample
Run search indexer named "searchIndexer".
searchIndexerAsyncClient.runIndexer("searchIndexer") .subscribe();
indexerName
- the name of the indexer to runpublic Mono<com.azure.core.http.rest.Response<Void>> runIndexerWithResponse(String indexerName)
Code Sample
Run search indexer named "searchIndexer".
searchIndexerAsyncClient.runIndexerWithResponse("searchIndexer") .subscribe(response -> System.out.println("The status code of the response is " + response.getStatusCode()));
indexerName
- the name of the indexer to runpublic Mono<SearchIndexerStatus> getIndexerStatus(String indexerName)
Code Sample
Get status for search indexer "searchIndexer".
searchIndexerAsyncClient.getIndexerStatus("searchIndexer") .subscribe(indexerStatus -> System.out.printf("The indexer status is %s.%n", indexerStatus.getStatus()));
indexerName
- the name of the indexer for which to retrieve statuspublic Mono<com.azure.core.http.rest.Response<SearchIndexerStatus>> getIndexerStatusWithResponse(String indexerName)
Code Sample
Get search indexer status.
searchIndexerAsyncClient.getIndexerStatusWithResponse("searchIndexer") .subscribe(response -> System.out.printf("The status code of the response is %s.%nThe indexer status is %s.%n", response.getStatusCode(), response.getValue().getStatus()));
indexerName
- the name of the indexer for which to retrieve statuspublic Mono<SearchIndexerSkillset> createSkillset(SearchIndexerSkillset skillset)
Code Sample
Create search indexer skillset "searchIndexerSkillset".
List<InputFieldMappingEntry> inputs = Collections.singletonList( new InputFieldMappingEntry("image") .setSource("/document/normalized_images/*") ); List<OutputFieldMappingEntry> outputs = Arrays.asList( new OutputFieldMappingEntry("text") .setTargetName("mytext"), new OutputFieldMappingEntry("layoutText") .setTargetName("myLayoutText") ); SearchIndexerSkillset searchIndexerSkillset = new SearchIndexerSkillset("searchIndexerSkillset", Collections.singletonList(new OcrSkill(inputs, outputs) .setShouldDetectOrientation(true) .setDefaultLanguageCode(null) .setName("myocr") .setDescription("Extracts text (plain and structured) from image.") .setContext("/document/normalized_images/*"))); searchIndexerAsyncClient.createSkillset(searchIndexerSkillset) .subscribe(skillset -> System.out.printf("The indexer skillset name is %s. The ETag of indexer skillset is %s.%n", skillset.getName(), skillset.getETag()));
skillset
- definition of the skillset containing one or more cognitive skillspublic Mono<com.azure.core.http.rest.Response<SearchIndexerSkillset>> createSkillsetWithResponse(SearchIndexerSkillset skillset)
Code Sample
Create search indexer skillset "searchIndexerSkillset".
List<InputFieldMappingEntry> inputs = Collections.singletonList( new InputFieldMappingEntry("image") .setSource("/document/normalized_images/*") ); List<OutputFieldMappingEntry> outputs = Arrays.asList( new OutputFieldMappingEntry("text") .setTargetName("mytext"), new OutputFieldMappingEntry("layoutText") .setTargetName("myLayoutText") ); SearchIndexerSkillset searchIndexerSkillset = new SearchIndexerSkillset("searchIndexerSkillset", Collections.singletonList(new OcrSkill(inputs, outputs) .setShouldDetectOrientation(true) .setDefaultLanguageCode(null) .setName("myocr") .setDescription("Extracts text (plain and structured) from image.") .setContext("/document/normalized_images/*"))); searchIndexerAsyncClient.createSkillsetWithResponse(searchIndexerSkillset) .subscribe(skillsetWithResponse -> System.out.printf("The status code of the response is %s. The indexer skillset name is %s.%n", skillsetWithResponse.getStatusCode(), skillsetWithResponse.getValue().getName()));
skillset
- definition of the skillset containing one or more cognitive skillspublic Mono<SearchIndexerSkillset> getSkillset(String skillsetName)
Code Sample
Get search indexer skillset "searchIndexerSkillset".
searchIndexerAsyncClient.getSkillset("searchIndexerSkillset") .subscribe(indexerSkillset -> System.out.printf("The indexer skillset name is %s. The ETag of indexer skillset is %s.%n", indexerSkillset.getName(), indexerSkillset.getETag()));
skillsetName
- the name of the skillset to retrievepublic Mono<com.azure.core.http.rest.Response<SearchIndexerSkillset>> getSkillsetWithResponse(String skillsetName)
Code Sample
Get search indexer skillset "searchIndexerSkillset".
searchIndexerAsyncClient.getSkillsetWithResponse("searchIndexerSkillset") .subscribe(skillsetWithResponse -> System.out.printf("The status code of the response is %s. The indexer skillset name is %s.%n", skillsetWithResponse.getStatusCode(), skillsetWithResponse.getValue().getName()));
skillsetName
- the name of the skillset to retrievepublic com.azure.core.http.rest.PagedFlux<SearchIndexerSkillset> listSkillsets()
Code Sample
List all search indexer skillsets.
searchIndexerAsyncClient.listSkillsets() .subscribe(skillset -> System.out.printf("The skillset name is %s. The ETag of skillset is %s.%n", skillset.getName(), skillset.getETag()));
public com.azure.core.http.rest.PagedFlux<String> listSkillsetNames()
Code Sample
List all search indexer skillset names.
searchIndexerAsyncClient.listSkillsetNames() .subscribe(skillsetName -> System.out.printf("The indexer skillset name is %s.%n", skillsetName));
public Mono<SearchIndexerSkillset> createOrUpdateSkillset(SearchIndexerSkillset skillset)
Code Sample
Create or update search indexer skillset "searchIndexerSkillset".
searchIndexerAsyncClient.getSkillset("searchIndexerSkillset") .flatMap(indexerSkillset -> { indexerSkillset.setDescription("This is new description!"); return searchIndexerAsyncClient.createOrUpdateSkillset(indexerSkillset); }).subscribe(updateSkillset -> System.out.printf("The indexer skillset name is %s. The description of indexer skillset is %s.%n", updateSkillset.getName(), updateSkillset.getDescription()));
skillset
- the definition of the skillset to create or updatepublic Mono<com.azure.core.http.rest.Response<SearchIndexerSkillset>> createOrUpdateSkillsetWithResponse(SearchIndexerSkillset skillset, boolean onlyIfUnchanged)
Code Sample
Create or update search indexer skillset "searchIndexerSkillset".
searchIndexerAsyncClient.getSkillset("searchIndexerSkillset") .flatMap(indexerSkillset -> { indexerSkillset.setDescription("This is new description!"); return searchIndexerAsyncClient.createOrUpdateSkillsetWithResponse(indexerSkillset, true); }) .subscribe(updateSkillsetResponse -> System.out.printf("The status code of the response is %s.%nThe indexer skillset name is %s. " + "The description of indexer skillset is %s.%n", updateSkillsetResponse.getStatusCode(), updateSkillsetResponse.getValue().getName(), updateSkillsetResponse.getValue().getDescription()));
skillset
- the definition of the skillset to create or updateonlyIfUnchanged
- true
to update if the skillset
is the same as the current service value.
false
to always update existing value.public Mono<com.azure.core.http.rest.Response<SearchIndexerSkillset>> createOrUpdateSkillsetWithResponse(CreateOrUpdateSkillsetOptions options)
Code Sample
Create or update search indexer skillset "searchIndexerSkillset".
searchIndexerAsyncClient.getSkillset("searchIndexerSkillset") .flatMap(indexerSkillset -> { indexerSkillset.setDescription("This is new description!"); return searchIndexerAsyncClient.createOrUpdateSkillsetWithResponse( new CreateOrUpdateSkillsetOptions(indexerSkillset) .setOnlyIfUnchanged(true) .setCacheReprocessingChangeDetectionDisabled(false) .setCacheResetRequirementsIgnored(true)); }) .subscribe(updateSkillsetResponse -> System.out.printf("The status code of the response is %s.%nThe indexer skillset name is %s. " + "The description of indexer skillset is %s.%n", updateSkillsetResponse.getStatusCode(), updateSkillsetResponse.getValue().getName(), updateSkillsetResponse.getValue().getDescription()));
options
- The options used to create or update the skillset
.NullPointerException
- If options
is null.public Mono<Void> deleteSkillset(String skillsetName)
Code Sample
Delete search indexer skillset "searchIndexerSkillset".
searchIndexerAsyncClient.deleteSkillset("searchIndexerSkillset") .subscribe();
skillsetName
- the name of the skillset to deletepublic Mono<com.azure.core.http.rest.Response<Void>> deleteSkillsetWithResponse(SearchIndexerSkillset skillset, boolean onlyIfUnchanged)
Code Sample
Delete search indexer skillset "searchIndexerSkillset".
searchIndexerAsyncClient.getSkillset("searchIndexerSkillset") .flatMap(searchIndexerSkillset -> searchIndexerAsyncClient.deleteSkillsetWithResponse(searchIndexerSkillset, true)) .subscribe(deleteResponse -> System.out.printf("The status code of the response is %d.%n", deleteResponse.getStatusCode()));
skillset
- the SearchIndexerSkillset
to delete.onlyIfUnchanged
- true
to delete if the skillset
is the same as the current service value.
false
to always delete existing value.Copyright © 2021 Microsoft Corporation. All rights reserved.