Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SearchIndexClient

Package version

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

Hierarchy

  • SearchIndexClient

Index

Constructors

constructor

  • 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: KeyCredential | TokenCredential

      Used to authenticate requests to the service.

    • Default value options: SearchIndexClientOptions = {}

      Used to configure the Search Index client.

    Returns SearchIndexClient

Properties

apiVersion

apiVersion: string = "2020-06-30-Preview"

The API version to use when communicating with the service.

endpoint

endpoint: string

The endpoint of the search service

Methods

analyzeText

createIndex

  • Creates a new index.

    Parameters

    • index: SearchIndex

      The information describing the index to be created.

    • Default value options: CreateIndexOptions = {}

      Additional optional arguments.

    Returns Promise<SearchIndex>

createOrUpdateIndex

  • Creates a new index or modifies an existing one.

    Parameters

    • index: SearchIndex

      The information describing the index to be created.

    • Default value options: CreateOrUpdateIndexOptions = {}

      Additional optional arguments.

    Returns Promise<SearchIndex>

createOrUpdateSynonymMap

  • Creates a new SynonymMap or modifies an existing one.

    Parameters

    • synonymMap: SynonymMap

      The information describing the SynonymMap to be created.

    • Default value options: CreateOrUpdateSynonymMapOptions = {}

      Additional optional arguments.

    Returns Promise<SynonymMap>

createSynonymMap

  • Creates a new SynonymMap in a search service.

    Parameters

    • synonymMap: SynonymMap

      The synonymMap definition to create in a search service.

    • Default value options: CreateSynonymMapOptions = {}

      Additional optional arguments.

    Returns Promise<SynonymMap>

deleteIndex

deleteSynonymMap

getIndex

  • getIndex(indexName: string, options?: GetIndexOptions): Promise<SearchIndex>
  • Retrieves information about an index.

    Parameters

    • indexName: string

      The name of the index.

    • Default value options: GetIndexOptions = {}

      Additional optional arguments.

    Returns Promise<SearchIndex>

getIndexStatistics

getSearchClient

  • getSearchClient<T>(indexName: string, options?: GetSearchClientOptions): SearchClient<T>
  • Retrieves the SearchClient corresponding to this SearchIndexClient

    Type parameters

    • T

    Parameters

    • indexName: string

      Name of the index

    • Optional options: GetSearchClientOptions

      SearchClient Options

    Returns SearchClient<T>

getServiceStatistics

getSynonymMap

  • Retrieves information about a SynonymMap.

    Parameters

    • synonymMapName: string

      The name of the SynonymMap.

    • Default value options: GetSynonymMapsOptions = {}

      Additional optional arguments.

    Returns Promise<SynonymMap>

listIndexes

listIndexesNames

listSynonymMaps

  • Retrieves a list of existing SynonymMaps in the service.

    Parameters

    Returns Promise<Array<SynonymMap>>

listSynonymMapsNames

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

    Parameters

    Returns Promise<Array<string>>

Generated using TypeDoc