Package version:

Class to perform operations to manage (create, update, list/delete) indexes, & synonymmaps.

Constructors

  • Creates an instance of SearchIndexClient.

    Example usage:

    const { SearchIndexClient, AzureKeyCredential } = require("@azure/search-documents");

    const client = new SearchIndexClient(
    "<endpoint>",
    new AzureKeyCredential("<Admin Key>");
    );

    Parameters

    • endpoint: string

      The endpoint of the search service

    • credential: any

      Used to authenticate requests to the service.

    • options: SearchIndexClientOptions = {}

      Used to configure the Search Index client.

    Returns SearchIndexClient

Properties

apiVersion: string = utils.defaultServiceVersion

The API version to use when communicating with the service.

use {@Link serviceVersion} instead

endpoint: string

The endpoint of the search service

pipeline: Pipeline

A reference to the internal HTTP pipeline for use with raw requests

serviceVersion: string = utils.defaultServiceVersion

The API version to use when communicating with the service.

Methods

  • Calls an analyzer or tokenizer manually on provided text.

    Parameters

    • indexName: string

      The name of the index that contains the field to analyze

    • options: any

      Additional arguments

    Returns Promise<AnalyzeResult>

  • Creates a new SynonymMap in a search service.

    Parameters

    • synonymMap: SynonymMap

      The synonymMap definition to create in a search service.

    • options: OperationOptions = {}

      Additional optional arguments.

    Returns Promise<SynonymMap>

  • 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

    Returns Promise<void>

  • Retrieves an alias definition.

    Parameters

    • aliasName: string

      The name of the alias to retrieve.

    • options: OperationOptions = {}

      The options parameters.

    Returns Promise<SearchAlias>

  • Retrieves information about an index.

    Parameters

    • indexName: string

      The name of the index.

    • options: OperationOptions = {}

      Additional optional arguments.

    Returns Promise<SearchIndex>

  • Retrieves statistics about an index, such as the count of documents and the size of index storage.

    Parameters

    • indexName: string

      The name of the index.

    • options: OperationOptions = {}

      Additional optional arguments.

    Returns Promise<SearchIndexStatistics>

  • Retrieves the SearchClient corresponding to this SearchIndexClient

    Type Parameters

    • TModel extends object

      An optional type that represents the documents stored in the search index. For the best typing experience, all non-key fields should be marked optional and nullable, and the key property should have the non-nullable type string.

    Parameters

    Returns SearchClient<TModel>

  • Retrieves information about a SynonymMap.

    Parameters

    • synonymMapName: string

      The name of the SynonymMap.

    • options: OperationOptions = {}

      Additional optional arguments.

    Returns Promise<SynonymMap>

  • Retrieves a list of names of existing indexes in the service.

    Parameters

    • options: OperationOptions = {}

      Options to the list index operation.

    Returns PagedAsyncIterableIterator<string, string[], {}>

  • Retrieves a list of existing SynonymMaps in the service.

    Parameters

    • options: OperationOptions = {}

      Options to the list SynonymMaps operation.

    Returns Promise<SynonymMap[]>

  • Retrieves a list of names of existing SynonymMaps in the service.

    Parameters

    • options: OperationOptions = {}

      Options to the list SynonymMaps operation.

    Returns Promise<string[]>