SearchIndexerClient class
Class to perform operations to manage (create, update, list/delete) indexers, datasources & skillsets.
Constructors
Search |
Creates an instance of SearchIndexerClient. Example usage:
|
Properties
api |
The API version to use when communicating with the service. |
endpoint | The endpoint of the search service |
service |
The API version to use when communicating with the service. |
Methods
Constructor Details
SearchIndexerClient(string, KeyCredential | TokenCredential, SearchIndexerClientOptions)
Creates an instance of SearchIndexerClient.
Example usage:
const { SearchIndexerClient, AzureKeyCredential } = require("@azure/search-documents");
const client = new SearchIndexerClient(
"<endpoint>",
new AzureKeyCredential("<Admin Key>");
);
new SearchIndexerClient(endpoint: string, credential: KeyCredential | TokenCredential, options?: SearchIndexerClientOptions)
Parameters
- endpoint
-
string
The endpoint of the search service
- credential
Used to authenticate requests to the service.
- options
- SearchIndexerClientOptions
Used to configure the Search client.
Property Details
apiVersion
Warning
This API is now deprecated.
use {@Link serviceVersion} instead
The API version to use when communicating with the service.
apiVersion: string
Property Value
string
endpoint
The endpoint of the search service
endpoint: string
Property Value
string
serviceVersion
The API version to use when communicating with the service.
serviceVersion: string
Property Value
string
Method Details
createDataSourceConnection(SearchIndexerDataSourceConnection, OperationOptions)
Creates a new dataSource in a search service.
function createDataSourceConnection(dataSourceConnection: SearchIndexerDataSourceConnection, options?: OperationOptions): Promise<SearchIndexerDataSourceConnection>
Parameters
- dataSourceConnection
- SearchIndexerDataSourceConnection
The dataSource definition to create in a search service.
- options
- OperationOptions
Additional optional arguments.
Returns
Promise<SearchIndexerDataSourceConnection>
createIndexer(SearchIndexer, OperationOptions)
Creates a new indexer in a search service.
function createIndexer(indexer: SearchIndexer, options?: OperationOptions): Promise<SearchIndexer>
Parameters
- indexer
- SearchIndexer
The indexer definition to create in a search service.
- options
- OperationOptions
Additional optional arguments.
Returns
Promise<SearchIndexer>
createOrUpdateDataSourceConnection(SearchIndexerDataSourceConnection, CreateorUpdateDataSourceConnectionOptions)
Creates a new datasource or modifies an existing one.
function createOrUpdateDataSourceConnection(dataSourceConnection: SearchIndexerDataSourceConnection, options?: CreateorUpdateDataSourceConnectionOptions): Promise<SearchIndexerDataSourceConnection>
Parameters
- dataSourceConnection
- SearchIndexerDataSourceConnection
The information describing the datasource to be created/updated.
Additional optional arguments.
Returns
Promise<SearchIndexerDataSourceConnection>
createOrUpdateIndexer(SearchIndexer, CreateorUpdateIndexerOptions)
Creates a new indexer or modifies an existing one.
function createOrUpdateIndexer(indexer: SearchIndexer, options?: CreateorUpdateIndexerOptions): Promise<SearchIndexer>
Parameters
- indexer
- SearchIndexer
The information describing the indexer to be created/updated.
- options
- CreateorUpdateIndexerOptions
Additional optional arguments.
Returns
Promise<SearchIndexer>
createOrUpdateSkillset(SearchIndexerSkillset, CreateOrUpdateSkillsetOptions)
Creates a new Skillset or modifies an existing one.
function createOrUpdateSkillset(skillset: SearchIndexerSkillset, options?: CreateOrUpdateSkillsetOptions): Promise<SearchIndexerSkillset>
Parameters
- skillset
- SearchIndexerSkillset
The information describing the index to be created.
- options
- CreateOrUpdateSkillsetOptions
Additional optional arguments.
Returns
Promise<SearchIndexerSkillset>
createSkillset(SearchIndexerSkillset, OperationOptions)
Creates a new skillset in a search service.
function createSkillset(skillset: SearchIndexerSkillset, options?: OperationOptions): Promise<SearchIndexerSkillset>
Parameters
- skillset
- SearchIndexerSkillset
The skillset containing one or more skills to create in a search service.
- options
- OperationOptions
Additional optional arguments.
Returns
Promise<SearchIndexerSkillset>
deleteDataSourceConnection(string | SearchIndexerDataSourceConnection, DeleteDataSourceConnectionOptions)
Deletes an existing datasource.
function deleteDataSourceConnection(dataSourceConnection: string | SearchIndexerDataSourceConnection, options?: DeleteDataSourceConnectionOptions): Promise<void>
Parameters
- dataSourceConnection
-
string | SearchIndexerDataSourceConnection
Additional optional arguments.
Returns
Promise<void>
deleteIndexer(string | SearchIndexer, DeleteIndexerOptions)
Deletes an existing indexer.
function deleteIndexer(indexer: string | SearchIndexer, options?: DeleteIndexerOptions): Promise<void>
Parameters
- indexer
-
string | SearchIndexer
Indexer/Name of the indexer to delete.
- options
- DeleteIndexerOptions
Additional optional arguments.
Returns
Promise<void>
deleteSkillset(string | SearchIndexerSkillset, DeleteSkillsetOptions)
Deletes an existing Skillset.
function deleteSkillset(skillset: string | SearchIndexerSkillset, options?: DeleteSkillsetOptions): Promise<void>
Parameters
- skillset
-
string | SearchIndexerSkillset
Skillset/Name of the Skillset to delete.
- options
- DeleteSkillsetOptions
Additional optional arguments.
Returns
Promise<void>
getDataSourceConnection(string, OperationOptions)
Retrieves information about a DataSource
function getDataSourceConnection(dataSourceConnectionName: string, options?: OperationOptions): Promise<SearchIndexerDataSourceConnection>
Parameters
- dataSourceConnectionName
-
string
- options
- OperationOptions
Additional optional arguments
Returns
Promise<SearchIndexerDataSourceConnection>
getIndexer(string, OperationOptions)
Retrieves information about an Indexer.
function getIndexer(indexerName: string, options?: OperationOptions): Promise<SearchIndexer>
Parameters
- indexerName
-
string
The name of the Indexer.
- options
- OperationOptions
Additional optional arguments.
Returns
Promise<SearchIndexer>
getIndexerStatus(string, OperationOptions)
Returns the current status and execution history of an indexer.
function getIndexerStatus(indexerName: string, options?: OperationOptions): Promise<SearchIndexerStatus>
Parameters
- indexerName
-
string
The name of the indexer.
- options
- OperationOptions
Additional optional arguments.
Returns
Promise<SearchIndexerStatus>
getSkillset(string, OperationOptions)
Retrieves information about an Skillset.
function getSkillset(skillsetName: string, options?: OperationOptions): Promise<SearchIndexerSkillset>
Parameters
- skillsetName
-
string
- options
- OperationOptions
Additional optional arguments.
Returns
Promise<SearchIndexerSkillset>
listDataSourceConnections(OperationOptions)
Retrieves a list of existing data sources in the service.
function listDataSourceConnections(options?: OperationOptions): Promise<SearchIndexerDataSourceConnection[]>
Parameters
- options
- OperationOptions
Options to the list indexers operation.
Returns
Promise<SearchIndexerDataSourceConnection[]>
listDataSourceConnectionsNames(OperationOptions)
Retrieves a list of names of existing data sources in the service.
function listDataSourceConnectionsNames(options?: OperationOptions): Promise<string[]>
Parameters
- options
- OperationOptions
Options to the list indexers operation.
Returns
Promise<string[]>
listIndexers(OperationOptions)
Retrieves a list of existing indexers in the service.
function listIndexers(options?: OperationOptions): Promise<SearchIndexer[]>
Parameters
- options
- OperationOptions
Options to the list indexers operation.
Returns
Promise<SearchIndexer[]>
listIndexersNames(OperationOptions)
Retrieves a list of names of existing indexers in the service.
function listIndexersNames(options?: OperationOptions): Promise<string[]>
Parameters
- options
- OperationOptions
Options to the list indexers operation.
Returns
Promise<string[]>
listSkillsets(OperationOptions)
Retrieves a list of existing Skillsets in the service.
function listSkillsets(options?: OperationOptions): Promise<SearchIndexerSkillset[]>
Parameters
- options
- OperationOptions
Options to the list Skillsets operation.
Returns
Promise<SearchIndexerSkillset[]>
listSkillsetsNames(OperationOptions)
Retrieves a list of names of existing Skillsets in the service.
function listSkillsetsNames(options?: OperationOptions): Promise<string[]>
Parameters
- options
- OperationOptions
Options to the list Skillsets operation.
Returns
Promise<string[]>
resetIndexer(string, OperationOptions)
Resets the change tracking state associated with an indexer.
function resetIndexer(indexerName: string, options?: OperationOptions): Promise<void>
Parameters
- indexerName
-
string
The name of the indexer to reset.
- options
- OperationOptions
Additional optional arguments.
Returns
Promise<void>
runIndexer(string, OperationOptions)
Runs an indexer on-demand.
function runIndexer(indexerName: string, options?: OperationOptions): Promise<void>
Parameters
- indexerName
-
string
The name of the indexer to run.
- options
- OperationOptions
Additional optional arguments.
Returns
Promise<void>