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 |
Methods
Constructor Details
SearchIndexerClient(string, KeyCredential, 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, options?: SearchIndexerClientOptions)
Parameters
- endpoint
-
string
The endpoint of the search service
- credential
-
KeyCredential
Used to authenticate requests to the service.
- options
- SearchIndexerClientOptions
Used to configure the Search client.
Property Details
apiVersion
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
Method Details
createDataSourceConnection(SearchIndexerDataSourceConnection, CreateDataSourceConnectionOptions)
Creates a new dataSource in a search service.
function createDataSourceConnection(dataSourceConnection: SearchIndexerDataSourceConnection, options?: CreateDataSourceConnectionOptions): Promise<SearchIndexerDataSourceConnection>
Parameters
- dataSourceConnection
- SearchIndexerDataSourceConnection
The dataSource definition to create in a search service.
Additional optional arguments.
Returns
Promise<SearchIndexerDataSourceConnection>
createIndexer(SearchIndexer, CreateIndexerOptions)
Creates a new indexer in a search service.
function createIndexer(indexer: SearchIndexer, options?: CreateIndexerOptions): Promise<SearchIndexer>
Parameters
- indexer
- SearchIndexer
The indexer definition to create in a search service.
- options
- CreateIndexerOptions
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, CreateSkillsetOptions)
Creates a new skillset in a search service.
function createSkillset(skillset: SearchIndexerSkillset, options?: CreateSkillsetOptions): Promise<SearchIndexerSkillset>
Parameters
- skillset
- SearchIndexerSkillset
The skillset containing one or more skills to create in a search service.
- options
- CreateSkillsetOptions
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, GetDataSourceConnectionOptions)
Retrieves information about a DataSource
function getDataSourceConnection(dataSourceConnectionName: string, options?: GetDataSourceConnectionOptions): Promise<SearchIndexerDataSourceConnection>
Parameters
- dataSourceConnectionName
-
string
- options
- GetDataSourceConnectionOptions
Additional optional arguments
Returns
Promise<SearchIndexerDataSourceConnection>
getIndexer(string, GetIndexerOptions)
Retrieves information about an Indexer.
function getIndexer(indexerName: string, options?: GetIndexerOptions): Promise<SearchIndexer>
Parameters
- indexerName
-
string
The name of the Indexer.
- options
- GetIndexerOptions
Additional optional arguments.
Returns
Promise<SearchIndexer>
getIndexerStatus(string, GetIndexerStatusOptions)
Returns the current status and execution history of an indexer.
function getIndexerStatus(indexerName: string, options?: GetIndexerStatusOptions): Promise<SearchIndexerStatus>
Parameters
- indexerName
-
string
The name of the indexer.
- options
- GetIndexerStatusOptions
Additional optional arguments.
Returns
Promise<SearchIndexerStatus>
getSkillset(string, GetSkillSetOptions)
Retrieves information about an Skillset.
function getSkillset(skillsetName: string, options?: GetSkillSetOptions): Promise<SearchIndexerSkillset>
Parameters
- skillsetName
-
string
- options
- GetSkillSetOptions
Additional optional arguments.
Returns
Promise<SearchIndexerSkillset>
listDataSourceConnections(ListDataSourceConnectionsOptions)
Retrieves a list of existing data sources in the service.
function listDataSourceConnections(options?: ListDataSourceConnectionsOptions): Promise<Array<SearchIndexerDataSourceConnection>>
Parameters
- options
- ListDataSourceConnectionsOptions
Options to the list indexers operation.
Returns
Promise<Array<SearchIndexerDataSourceConnection>>
listDataSourceConnectionsNames(ListDataSourceConnectionsOptions)
Retrieves a list of names of existing data sources in the service.
function listDataSourceConnectionsNames(options?: ListDataSourceConnectionsOptions): Promise<Array<string>>
Parameters
- options
- ListDataSourceConnectionsOptions
Options to the list indexers operation.
Returns
Promise<Array<string>>
listIndexers(ListIndexersOptions)
Retrieves a list of existing indexers in the service.
function listIndexers(options?: ListIndexersOptions): Promise<Array<SearchIndexer>>
Parameters
- options
- ListIndexersOptions
Options to the list indexers operation.
Returns
Promise<Array<SearchIndexer>>
listIndexersNames(ListIndexersOptions)
Retrieves a list of names of existing indexers in the service.
function listIndexersNames(options?: ListIndexersOptions): Promise<Array<string>>
Parameters
- options
- ListIndexersOptions
Options to the list indexers operation.
Returns
Promise<Array<string>>
listSkillsets(ListSkillsetsOptions)
Retrieves a list of existing Skillsets in the service.
function listSkillsets(options?: ListSkillsetsOptions): Promise<Array<SearchIndexerSkillset>>
Parameters
- options
- ListSkillsetsOptions
Options to the list Skillsets operation.
Returns
Promise<Array<SearchIndexerSkillset>>
listSkillsetsNames(ListSkillsetsOptions)
Retrieves a list of names of existing Skillsets in the service.
function listSkillsetsNames(options?: ListSkillsetsOptions): Promise<Array<string>>
Parameters
- options
- ListSkillsetsOptions
Options to the list Skillsets operation.
Returns
Promise<Array<string>>
resetIndexer(string, ResetIndexerOptions)
Resets the change tracking state associated with an indexer.
function resetIndexer(indexerName: string, options?: ResetIndexerOptions): Promise<void>
Parameters
- indexerName
-
string
The name of the indexer to reset.
- options
- ResetIndexerOptions
Additional optional arguments.
Returns
Promise<void>
runIndexer(string, RunIndexerOptions)
Runs an indexer on-demand.
function runIndexer(indexerName: string, options?: RunIndexerOptions): Promise<void>
Parameters
- indexerName
-
string
The name of the indexer to run.
- options
- RunIndexerOptions
Additional optional arguments.
Returns
Promise<void>