@azure/search-documents 11.3.0-alpha.20220510.2 → 11.3.0-alpha.20220707.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +122 -121
- package/dist/index.js.map +1 -1
- package/dist-esm/src/searchClient.js +22 -23
- package/dist-esm/src/searchClient.js.map +1 -1
- package/dist-esm/src/searchIndexClient.js +40 -41
- package/dist-esm/src/searchIndexClient.js.map +1 -1
- package/dist-esm/src/searchIndexerClient.js +46 -47
- package/dist-esm/src/searchIndexerClient.js.map +1 -1
- package/dist-esm/src/searchIndexingBufferedSender.js +10 -11
- package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
- package/dist-esm/src/tracing.js +5 -4
- package/dist-esm/src/tracing.js.map +1 -1
- package/package.json +3 -3
- package/CHANGELOG.md +0 -209
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchIndexClient.js","sourceRoot":"","sources":["../../src/searchIndexClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,4CAA4C;AAE5C,OAAO,EAAkC,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,mBAAmB,IAAI,eAAe,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kCAAkC,EAAE,MAAM,gCAAgC,CAAC;AA6BpF,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAi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QAC3E,OAAO,IAAI,YAAY,CAAI,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;IACjG,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport { KeyCredential, TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { InternalClientPipelineOptions } from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { SpanStatusCode } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants\";\nimport { AnalyzeResult } from \"./generated/service/models\";\nimport { SearchServiceClient as GeneratedClient } from \"./generated/service/searchServiceClient\";\nimport { logger } from \"./logger\";\nimport { createSearchApiKeyCredentialPolicy } from \"./searchApiKeyCredentialPolicy\";\nimport {\n AnalyzeTextOptions,\n CreateIndexOptions,\n CreateOrUpdateIndexOptions,\n CreateOrUpdateSynonymMapOptions,\n CreateSynonymMapOptions,\n DeleteIndexOptions,\n DeleteSynonymMapOptions,\n GetIndexOptions,\n GetIndexStatisticsOptions,\n GetSynonymMapsOptions,\n SearchIndex,\n ListIndexesOptions,\n ListSynonymMapsOptions,\n SynonymMap,\n GetServiceStatisticsOptions,\n IndexIterator,\n IndexNameIterator,\n SearchIndexStatistics,\n SearchServiceStatistics,\n CreateAliasOptions,\n SearchIndexAlias,\n CreateOrUpdateAliasOptions,\n DeleteAliasOptions,\n GetAliasOptions,\n ListAliasesOptions,\n AliasIterator,\n} from \"./serviceModels\";\nimport * as utils from \"./serviceUtils\";\nimport { createSpan } from \"./tracing\";\nimport { createOdataMetadataPolicy } from \"./odataMetadataPolicy\";\nimport { SearchClient, SearchClientOptions as GetSearchClientOptions } from \"./searchClient\";\nimport { ExtendedCommonClientOptions } from \"@azure/core-http-compat\";\n\n/**\n * Client options used to configure Cognitive Search API requests.\n */\nexport interface SearchIndexClientOptions extends ExtendedCommonClientOptions {\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@Link serviceVersion} instead\n */\n apiVersion?: string;\n\n /**\n * The service version to use when communicating with the service.\n */\n serviceVersion?: string;\n}\n\n/**\n * Class to perform operations to manage\n * (create, update, list/delete)\n * indexes, & synonymmaps.\n */\nexport class SearchIndexClient {\n /**\n * The API version to use when communicating with the service.\n */\n public readonly serviceVersion: string = utils.defaultServiceVersion;\n\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@Link serviceVersion} instead\n */\n public readonly apiVersion: string = utils.defaultServiceVersion;\n\n /**\n * The endpoint of the search service\n */\n public readonly endpoint: string;\n\n /**\n * @internal\n * @hidden\n * A reference to the auto-generated SearchServiceClient\n */\n private readonly client: GeneratedClient;\n\n /**\n * Used to authenticate requests to the service.\n */\n private readonly credential: KeyCredential | TokenCredential;\n\n /**\n * Used to configure the Search Index client.\n */\n private readonly options: SearchIndexClientOptions;\n\n /**\n * Creates an instance of SearchIndexClient.\n *\n * Example usage:\n * ```ts\n * const { SearchIndexClient, AzureKeyCredential } = require(\"@azure/search-documents\");\n *\n * const client = new SearchIndexClient(\n * \"<endpoint>\",\n * new AzureKeyCredential(\"<Admin Key>\");\n * );\n * ```\n * @param endpoint - The endpoint of the search service\n * @param credential - Used to authenticate requests to the service.\n * @param options - Used to configure the Search Index client.\n */\n constructor(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options: SearchIndexClientOptions = {}\n ) {\n this.endpoint = endpoint;\n this.credential = credential;\n this.options = options;\n\n const libInfo = `azsdk-js-search-documents/${SDK_VERSION}`;\n if (!options.userAgentOptions) {\n options.userAgentOptions = {};\n }\n if (options.userAgentOptions.userAgentPrefix) {\n options.userAgentOptions.userAgentPrefix = `${options.userAgentOptions.userAgentPrefix} ${libInfo}`;\n } else {\n options.userAgentOptions.userAgentPrefix = libInfo;\n }\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n additionalAllowedHeaderNames: [\n \"elapsed-time\",\n \"Location\",\n \"OData-MaxVersion\",\n \"OData-Version\",\n \"Prefer\",\n \"throttle-reason\",\n ],\n },\n },\n };\n\n if (options.apiVersion) {\n if (!utils.serviceVersions.includes(options.apiVersion)) {\n throw new Error(`Invalid Api Version: ${options.apiVersion}`);\n }\n this.serviceVersion = options.apiVersion;\n this.apiVersion = options.apiVersion;\n }\n\n if (options.serviceVersion) {\n if (!utils.serviceVersions.includes(options.serviceVersion)) {\n throw new Error(`Invalid Service Version: ${options.serviceVersion}`);\n }\n this.serviceVersion = options.serviceVersion;\n this.apiVersion = options.serviceVersion;\n }\n\n this.client = new GeneratedClient(\n this.endpoint,\n this.serviceVersion,\n internalClientPipelineOptions\n );\n\n if (isTokenCredential(credential)) {\n this.client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({ credential, scopes: utils.DEFAULT_SEARCH_SCOPE })\n );\n } else {\n this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));\n }\n\n this.client.pipeline.addPolicy(createOdataMetadataPolicy(\"minimal\"));\n }\n\n private async *listIndexesPage(\n options: ListIndexesOptions = {}\n ): AsyncIterableIterator<SearchIndex[]> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-listIndexesPage\", options);\n try {\n const result = await this.client.indexes.list(updatedOptions);\n const mapped = result.indexes.map(utils.generatedIndexToPublicIndex);\n yield mapped;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private async *listIndexesAll(\n options: ListIndexesOptions = {}\n ): AsyncIterableIterator<SearchIndex> {\n for await (const page of this.listIndexesPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Retrieves a list of existing indexes in the service.\n * @param options - Options to the list index operation.\n */\n public listIndexes(options: ListIndexesOptions = {}): IndexIterator {\n const iter = this.listIndexesAll(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.listIndexesPage(options);\n },\n };\n }\n\n private async *listAliasesPage(\n options: ListAliasesOptions = {}\n ): AsyncIterableIterator<SearchIndexAlias[]> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-listAliases\", options);\n try {\n const result = await this.client.aliases.list(updatedOptions);\n yield result.aliases;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private async *listAliasesAll(\n options: ListAliasesOptions = {}\n ): AsyncIterableIterator<SearchIndexAlias> {\n for await (const page of this.listAliasesPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all aliases available for a search service.\n * @param options - The options parameters.\n */\n public listAliases(options: ListAliasesOptions = {}): AliasIterator {\n const iter = this.listAliasesAll(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.listAliasesPage(options);\n },\n };\n }\n\n private async *listIndexesNamesPage(\n options: ListIndexesOptions = {}\n ): AsyncIterableIterator<string[]> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-listIndexesNamesPage\", options);\n try {\n const result = await this.client.indexes.list({\n ...updatedOptions,\n select: \"name\",\n });\n const mapped = result.indexes.map((idx) => idx.name);\n yield mapped;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private async *listIndexesNamesAll(\n options: ListIndexesOptions = {}\n ): AsyncIterableIterator<string> {\n for await (const page of this.listIndexesNamesPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Retrieves a list of names of existing indexes in the service.\n * @param options - Options to the list index operation.\n */\n public listIndexesNames(options: ListIndexesOptions = {}): IndexNameIterator {\n const iter = this.listIndexesNamesAll(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.listIndexesNamesPage(options);\n },\n };\n }\n\n /**\n * Retrieves a list of existing SynonymMaps in the service.\n * @param options - Options to the list SynonymMaps operation.\n */\n public async listSynonymMaps(options: ListSynonymMapsOptions = {}): Promise<Array<SynonymMap>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-listSynonymMaps\", options);\n try {\n const result = await this.client.synonymMaps.list(updatedOptions);\n return result.synonymMaps.map(utils.generatedSynonymMapToPublicSynonymMap);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of names of existing SynonymMaps in the service.\n * @param options - Options to the list SynonymMaps operation.\n */\n public async listSynonymMapsNames(options: ListSynonymMapsOptions = {}): Promise<Array<string>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-listSynonymMapsNames\", options);\n try {\n const result = await this.client.synonymMaps.list({\n ...updatedOptions,\n select: \"name\",\n });\n return result.synonymMaps.map((sm) => sm.name);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves information about an index.\n * @param indexName - The name of the index.\n * @param options - Additional optional arguments.\n */\n public async getIndex(indexName: string, options: GetIndexOptions = {}): Promise<SearchIndex> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-getIndex\", options);\n try {\n const result = await this.client.indexes.get(indexName, updatedOptions);\n return utils.generatedIndexToPublicIndex(result);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves information about a SynonymMap.\n * @param synonymMapName - The name of the SynonymMap.\n * @param options - Additional optional arguments.\n */\n public async getSynonymMap(\n synonymMapName: string,\n options: GetSynonymMapsOptions = {}\n ): Promise<SynonymMap> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-getSynonymMaps\", options);\n try {\n const result = await this.client.synonymMaps.get(synonymMapName, updatedOptions);\n return utils.generatedSynonymMapToPublicSynonymMap(result);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new index.\n * @param index - The information describing the index to be created.\n * @param options - Additional optional arguments.\n */\n public async createIndex(\n index: SearchIndex,\n options: CreateIndexOptions = {}\n ): Promise<SearchIndex> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-createIndex\", options);\n try {\n const result = await this.client.indexes.create(\n utils.publicIndexToGeneratedIndex(index),\n updatedOptions\n );\n return utils.generatedIndexToPublicIndex(result);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new SynonymMap in a search service.\n * @param synonymMap - The synonymMap definition to create in a search service.\n * @param options - Additional optional arguments.\n */\n public async createSynonymMap(\n synonymMap: SynonymMap,\n options: CreateSynonymMapOptions = {}\n ): Promise<SynonymMap> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-createSynonymMaps\", options);\n try {\n const result = await this.client.synonymMaps.create(\n utils.publicSynonymMapToGeneratedSynonymMap(synonymMap),\n updatedOptions\n );\n return utils.generatedSynonymMapToPublicSynonymMap(result);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new index or modifies an existing one.\n * @param index - The information describing the index to be created.\n * @param options - Additional optional arguments.\n */\n public async createOrUpdateIndex(\n index: SearchIndex,\n options: CreateOrUpdateIndexOptions = {}\n ): Promise<SearchIndex> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-createOrUpdateIndex\", options);\n try {\n const etag = options.onlyIfUnchanged ? index.etag : undefined;\n\n const result = await this.client.indexes.createOrUpdate(\n index.name,\n utils.publicIndexToGeneratedIndex(index),\n {\n ...updatedOptions,\n ifMatch: etag,\n }\n );\n return utils.generatedIndexToPublicIndex(result);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new SynonymMap or modifies an existing one.\n * @param synonymMap - The information describing the SynonymMap to be created.\n * @param options - Additional optional arguments.\n */\n public async createOrUpdateSynonymMap(\n synonymMap: SynonymMap,\n options: CreateOrUpdateSynonymMapOptions = {}\n ): Promise<SynonymMap> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexClient-createOrUpdateSynonymMap\",\n options\n );\n try {\n const etag = options.onlyIfUnchanged ? synonymMap.etag : undefined;\n\n const result = await this.client.synonymMaps.createOrUpdate(\n synonymMap.name,\n utils.publicSynonymMapToGeneratedSynonymMap(synonymMap),\n {\n ...updatedOptions,\n ifMatch: etag,\n }\n );\n return utils.generatedSynonymMapToPublicSynonymMap(result);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes an existing index.\n * @param indexName - Index/Name of the index to delete.\n * @param options - Additional optional arguments.\n */\n public async deleteIndex(\n index: string | SearchIndex,\n options: DeleteIndexOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-deleteIndex\", options);\n try {\n const indexName: string = typeof index === \"string\" ? index : index.name;\n const etag =\n typeof index === \"string\" ? undefined : options.onlyIfUnchanged ? index.etag : undefined;\n\n await this.client.indexes.delete(indexName, {\n ...updatedOptions,\n ifMatch: etag,\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes an existing SynonymMap.\n * @param synonymMapName - SynonymMap/Name of the synonymMap to delete.\n * @param options - Additional optional arguments.\n */\n public async deleteSynonymMap(\n synonymMap: string | SynonymMap,\n options: DeleteSynonymMapOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-deleteSynonymMap\", options);\n try {\n const synonymMapName: string = typeof synonymMap === \"string\" ? synonymMap : synonymMap.name;\n const etag =\n typeof synonymMap === \"string\"\n ? undefined\n : options.onlyIfUnchanged\n ? synonymMap.etag\n : undefined;\n\n await this.client.synonymMaps.delete(synonymMapName, {\n ...updatedOptions,\n ifMatch: etag,\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new search alias or updates an alias if it already exists.\n * @param alias - The definition of the alias to create or update.\n * @param options - The options parameters.\n */\n public async createOrUpdateAlias(\n alias: SearchIndexAlias,\n options: CreateOrUpdateAliasOptions = {}\n ): Promise<SearchIndexAlias> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-createOrUpdateAlias\", options);\n try {\n const etag = options.onlyIfUnchanged ? alias.etag : undefined;\n\n const result = await this.client.aliases.createOrUpdate(alias.name, alias, {\n ...updatedOptions,\n ifMatch: etag,\n });\n return result;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new search alias.\n * @param alias - The definition of the alias to create.\n * @param options - The options parameters.\n */\n public async createAlias(\n alias: SearchIndexAlias,\n options: CreateAliasOptions = {}\n ): Promise<SearchIndexAlias> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-createAlias\", options);\n try {\n const result = await this.client.aliases.create(alias, updatedOptions);\n return result;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no\n * recovery option. The mapped index is untouched by this operation.\n * @param alias - Alias/Name name of the alias to delete.\n * @param options - The options parameters.\n */\n public async deleteAlias(\n alias: string | SearchIndexAlias,\n options: DeleteAliasOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-deleteAlias\", options);\n try {\n const aliasName: string = typeof alias === \"string\" ? alias : alias.name;\n const etag =\n typeof alias === \"string\" ? undefined : options.onlyIfUnchanged ? alias.etag : undefined;\n\n await this.client.aliases.delete(aliasName, {\n ...updatedOptions,\n ifMatch: etag,\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves an alias definition.\n * @param aliasName - The name of the alias to retrieve.\n * @param options - The options parameters.\n */\n public async getAlias(\n aliasName: string,\n options: GetAliasOptions = {}\n ): Promise<SearchIndexAlias> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-getAlias\", options);\n try {\n const result = await this.client.aliases.get(aliasName, updatedOptions);\n return result;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves statistics about an index, such as the count of documents and the size\n * of index storage.\n * @param indexName - The name of the index.\n * @param options - Additional optional arguments.\n */\n public async getIndexStatistics(\n indexName: string,\n options: GetIndexStatisticsOptions = {}\n ): Promise<SearchIndexStatistics> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-getIndexStatistics\", options);\n try {\n const result = await this.client.indexes.getStatistics(indexName, updatedOptions);\n return result;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Calls an analyzer or tokenizer manually on provided text.\n * @param indexName - The name of the index that contains the field to analyze\n * @param text - The text to break into tokens.\n * @param options - Additional arguments\n */\n public async analyzeText(indexName: string, options: AnalyzeTextOptions): Promise<AnalyzeResult> {\n const { abortSignal, requestOptions, tracingOptions, ...restOptions } = options;\n const operationOptions = {\n abortSignal,\n requestOptions,\n tracingOptions,\n };\n\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-analyzeText\", operationOptions);\n try {\n const result = await this.client.indexes.analyze(\n indexName,\n {\n ...restOptions,\n analyzer: restOptions.analyzerName,\n tokenizer: restOptions.tokenizerName,\n normalizer: restOptions.normalizerName,\n },\n updatedOptions\n );\n return result;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves statistics about the service, such as the count of documents, index, etc.\n * @param options - Additional optional arguments.\n */\n public async getServiceStatistics(\n options: GetServiceStatisticsOptions = {}\n ): Promise<SearchServiceStatistics> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-getServiceStatistics\", options);\n try {\n const result = await this.client.getServiceStatistics(updatedOptions);\n return result;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves the SearchClient corresponding to this SearchIndexClient\n * @param indexName - Name of the index\n * @param options - SearchClient Options\n */\n public getSearchClient<T>(indexName: string, options?: GetSearchClientOptions): SearchClient<T> {\n return new SearchClient<T>(this.endpoint, indexName, this.credential, options || this.options);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"searchIndexClient.js","sourceRoot":"","sources":["../../src/searchIndexClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,4CAA4C;AAE5C,OAAO,EAAkC,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,mBAAmB,IAAI,eAAe,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kCAAkC,EAAE,MAAM,gCAAgC,CAAC;AA6Bp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AAO,CAAC,CAAC;IACjG,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport { KeyCredential, TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { InternalClientPipelineOptions } from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { SDK_VERSION } from \"./constants\";\nimport { AnalyzeResult } from \"./generated/service/models\";\nimport { SearchServiceClient as GeneratedClient } from \"./generated/service/searchServiceClient\";\nimport { logger } from \"./logger\";\nimport { createSearchApiKeyCredentialPolicy } from \"./searchApiKeyCredentialPolicy\";\nimport {\n AnalyzeTextOptions,\n CreateIndexOptions,\n CreateOrUpdateIndexOptions,\n CreateOrUpdateSynonymMapOptions,\n CreateSynonymMapOptions,\n DeleteIndexOptions,\n DeleteSynonymMapOptions,\n GetIndexOptions,\n GetIndexStatisticsOptions,\n GetSynonymMapsOptions,\n SearchIndex,\n ListIndexesOptions,\n ListSynonymMapsOptions,\n SynonymMap,\n GetServiceStatisticsOptions,\n IndexIterator,\n IndexNameIterator,\n SearchIndexStatistics,\n SearchServiceStatistics,\n CreateAliasOptions,\n SearchIndexAlias,\n CreateOrUpdateAliasOptions,\n DeleteAliasOptions,\n GetAliasOptions,\n ListAliasesOptions,\n AliasIterator,\n} from \"./serviceModels\";\nimport * as utils from \"./serviceUtils\";\nimport { createSpan } from \"./tracing\";\nimport { createOdataMetadataPolicy } from \"./odataMetadataPolicy\";\nimport { SearchClient, SearchClientOptions as GetSearchClientOptions } from \"./searchClient\";\nimport { ExtendedCommonClientOptions } from \"@azure/core-http-compat\";\n\n/**\n * Client options used to configure Cognitive Search API requests.\n */\nexport interface SearchIndexClientOptions extends ExtendedCommonClientOptions {\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@Link serviceVersion} instead\n */\n apiVersion?: string;\n\n /**\n * The service version to use when communicating with the service.\n */\n serviceVersion?: string;\n}\n\n/**\n * Class to perform operations to manage\n * (create, update, list/delete)\n * indexes, & synonymmaps.\n */\nexport class SearchIndexClient {\n /**\n * The API version to use when communicating with the service.\n */\n public readonly serviceVersion: string = utils.defaultServiceVersion;\n\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@Link serviceVersion} instead\n */\n public readonly apiVersion: string = utils.defaultServiceVersion;\n\n /**\n * The endpoint of the search service\n */\n public readonly endpoint: string;\n\n /**\n * @internal\n * @hidden\n * A reference to the auto-generated SearchServiceClient\n */\n private readonly client: GeneratedClient;\n\n /**\n * Used to authenticate requests to the service.\n */\n private readonly credential: KeyCredential | TokenCredential;\n\n /**\n * Used to configure the Search Index client.\n */\n private readonly options: SearchIndexClientOptions;\n\n /**\n * Creates an instance of SearchIndexClient.\n *\n * Example usage:\n * ```ts\n * const { SearchIndexClient, AzureKeyCredential } = require(\"@azure/search-documents\");\n *\n * const client = new SearchIndexClient(\n * \"<endpoint>\",\n * new AzureKeyCredential(\"<Admin Key>\");\n * );\n * ```\n * @param endpoint - The endpoint of the search service\n * @param credential - Used to authenticate requests to the service.\n * @param options - Used to configure the Search Index client.\n */\n constructor(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options: SearchIndexClientOptions = {}\n ) {\n this.endpoint = endpoint;\n this.credential = credential;\n this.options = options;\n\n const libInfo = `azsdk-js-search-documents/${SDK_VERSION}`;\n if (!options.userAgentOptions) {\n options.userAgentOptions = {};\n }\n if (options.userAgentOptions.userAgentPrefix) {\n options.userAgentOptions.userAgentPrefix = `${options.userAgentOptions.userAgentPrefix} ${libInfo}`;\n } else {\n options.userAgentOptions.userAgentPrefix = libInfo;\n }\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n additionalAllowedHeaderNames: [\n \"elapsed-time\",\n \"Location\",\n \"OData-MaxVersion\",\n \"OData-Version\",\n \"Prefer\",\n \"throttle-reason\",\n ],\n },\n },\n };\n\n if (options.apiVersion) {\n if (!utils.serviceVersions.includes(options.apiVersion)) {\n throw new Error(`Invalid Api Version: ${options.apiVersion}`);\n }\n this.serviceVersion = options.apiVersion;\n this.apiVersion = options.apiVersion;\n }\n\n if (options.serviceVersion) {\n if (!utils.serviceVersions.includes(options.serviceVersion)) {\n throw new Error(`Invalid Service Version: ${options.serviceVersion}`);\n }\n this.serviceVersion = options.serviceVersion;\n this.apiVersion = options.serviceVersion;\n }\n\n this.client = new GeneratedClient(\n this.endpoint,\n this.serviceVersion,\n internalClientPipelineOptions\n );\n\n if (isTokenCredential(credential)) {\n this.client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({ credential, scopes: utils.DEFAULT_SEARCH_SCOPE })\n );\n } else {\n this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));\n }\n\n this.client.pipeline.addPolicy(createOdataMetadataPolicy(\"minimal\"));\n }\n\n private async *listIndexesPage(\n options: ListIndexesOptions = {}\n ): AsyncIterableIterator<SearchIndex[]> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-listIndexesPage\", options);\n try {\n const result = await this.client.indexes.list(updatedOptions);\n const mapped = result.indexes.map(utils.generatedIndexToPublicIndex);\n yield mapped;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private async *listIndexesAll(\n options: ListIndexesOptions = {}\n ): AsyncIterableIterator<SearchIndex> {\n for await (const page of this.listIndexesPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Retrieves a list of existing indexes in the service.\n * @param options - Options to the list index operation.\n */\n public listIndexes(options: ListIndexesOptions = {}): IndexIterator {\n const iter = this.listIndexesAll(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.listIndexesPage(options);\n },\n };\n }\n\n private async *listAliasesPage(\n options: ListAliasesOptions = {}\n ): AsyncIterableIterator<SearchIndexAlias[]> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-listAliases\", options);\n try {\n const result = await this.client.aliases.list(updatedOptions);\n yield result.aliases;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private async *listAliasesAll(\n options: ListAliasesOptions = {}\n ): AsyncIterableIterator<SearchIndexAlias> {\n for await (const page of this.listAliasesPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all aliases available for a search service.\n * @param options - The options parameters.\n */\n public listAliases(options: ListAliasesOptions = {}): AliasIterator {\n const iter = this.listAliasesAll(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.listAliasesPage(options);\n },\n };\n }\n\n private async *listIndexesNamesPage(\n options: ListIndexesOptions = {}\n ): AsyncIterableIterator<string[]> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-listIndexesNamesPage\", options);\n try {\n const result = await this.client.indexes.list({\n ...updatedOptions,\n select: \"name\",\n });\n const mapped = result.indexes.map((idx) => idx.name);\n yield mapped;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private async *listIndexesNamesAll(\n options: ListIndexesOptions = {}\n ): AsyncIterableIterator<string> {\n for await (const page of this.listIndexesNamesPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Retrieves a list of names of existing indexes in the service.\n * @param options - Options to the list index operation.\n */\n public listIndexesNames(options: ListIndexesOptions = {}): IndexNameIterator {\n const iter = this.listIndexesNamesAll(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.listIndexesNamesPage(options);\n },\n };\n }\n\n /**\n * Retrieves a list of existing SynonymMaps in the service.\n * @param options - Options to the list SynonymMaps operation.\n */\n public async listSynonymMaps(options: ListSynonymMapsOptions = {}): Promise<Array<SynonymMap>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-listSynonymMaps\", options);\n try {\n const result = await this.client.synonymMaps.list(updatedOptions);\n return result.synonymMaps.map(utils.generatedSynonymMapToPublicSynonymMap);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of names of existing SynonymMaps in the service.\n * @param options - Options to the list SynonymMaps operation.\n */\n public async listSynonymMapsNames(options: ListSynonymMapsOptions = {}): Promise<Array<string>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-listSynonymMapsNames\", options);\n try {\n const result = await this.client.synonymMaps.list({\n ...updatedOptions,\n select: \"name\",\n });\n return result.synonymMaps.map((sm) => sm.name);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves information about an index.\n * @param indexName - The name of the index.\n * @param options - Additional optional arguments.\n */\n public async getIndex(indexName: string, options: GetIndexOptions = {}): Promise<SearchIndex> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-getIndex\", options);\n try {\n const result = await this.client.indexes.get(indexName, updatedOptions);\n return utils.generatedIndexToPublicIndex(result);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves information about a SynonymMap.\n * @param synonymMapName - The name of the SynonymMap.\n * @param options - Additional optional arguments.\n */\n public async getSynonymMap(\n synonymMapName: string,\n options: GetSynonymMapsOptions = {}\n ): Promise<SynonymMap> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-getSynonymMaps\", options);\n try {\n const result = await this.client.synonymMaps.get(synonymMapName, updatedOptions);\n return utils.generatedSynonymMapToPublicSynonymMap(result);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new index.\n * @param index - The information describing the index to be created.\n * @param options - Additional optional arguments.\n */\n public async createIndex(\n index: SearchIndex,\n options: CreateIndexOptions = {}\n ): Promise<SearchIndex> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-createIndex\", options);\n try {\n const result = await this.client.indexes.create(\n utils.publicIndexToGeneratedIndex(index),\n updatedOptions\n );\n return utils.generatedIndexToPublicIndex(result);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new SynonymMap in a search service.\n * @param synonymMap - The synonymMap definition to create in a search service.\n * @param options - Additional optional arguments.\n */\n public async createSynonymMap(\n synonymMap: SynonymMap,\n options: CreateSynonymMapOptions = {}\n ): Promise<SynonymMap> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-createSynonymMaps\", options);\n try {\n const result = await this.client.synonymMaps.create(\n utils.publicSynonymMapToGeneratedSynonymMap(synonymMap),\n updatedOptions\n );\n return utils.generatedSynonymMapToPublicSynonymMap(result);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new index or modifies an existing one.\n * @param index - The information describing the index to be created.\n * @param options - Additional optional arguments.\n */\n public async createOrUpdateIndex(\n index: SearchIndex,\n options: CreateOrUpdateIndexOptions = {}\n ): Promise<SearchIndex> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-createOrUpdateIndex\", options);\n try {\n const etag = options.onlyIfUnchanged ? index.etag : undefined;\n\n const result = await this.client.indexes.createOrUpdate(\n index.name,\n utils.publicIndexToGeneratedIndex(index),\n {\n ...updatedOptions,\n ifMatch: etag,\n }\n );\n return utils.generatedIndexToPublicIndex(result);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new SynonymMap or modifies an existing one.\n * @param synonymMap - The information describing the SynonymMap to be created.\n * @param options - Additional optional arguments.\n */\n public async createOrUpdateSynonymMap(\n synonymMap: SynonymMap,\n options: CreateOrUpdateSynonymMapOptions = {}\n ): Promise<SynonymMap> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexClient-createOrUpdateSynonymMap\",\n options\n );\n try {\n const etag = options.onlyIfUnchanged ? synonymMap.etag : undefined;\n\n const result = await this.client.synonymMaps.createOrUpdate(\n synonymMap.name,\n utils.publicSynonymMapToGeneratedSynonymMap(synonymMap),\n {\n ...updatedOptions,\n ifMatch: etag,\n }\n );\n return utils.generatedSynonymMapToPublicSynonymMap(result);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes an existing index.\n * @param indexName - Index/Name of the index to delete.\n * @param options - Additional optional arguments.\n */\n public async deleteIndex(\n index: string | SearchIndex,\n options: DeleteIndexOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-deleteIndex\", options);\n try {\n const indexName: string = typeof index === \"string\" ? index : index.name;\n const etag =\n typeof index === \"string\" ? undefined : options.onlyIfUnchanged ? index.etag : undefined;\n\n await this.client.indexes.delete(indexName, {\n ...updatedOptions,\n ifMatch: etag,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes an existing SynonymMap.\n * @param synonymMapName - SynonymMap/Name of the synonymMap to delete.\n * @param options - Additional optional arguments.\n */\n public async deleteSynonymMap(\n synonymMap: string | SynonymMap,\n options: DeleteSynonymMapOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-deleteSynonymMap\", options);\n try {\n const synonymMapName: string = typeof synonymMap === \"string\" ? synonymMap : synonymMap.name;\n const etag =\n typeof synonymMap === \"string\"\n ? undefined\n : options.onlyIfUnchanged\n ? synonymMap.etag\n : undefined;\n\n await this.client.synonymMaps.delete(synonymMapName, {\n ...updatedOptions,\n ifMatch: etag,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new search alias or updates an alias if it already exists.\n * @param alias - The definition of the alias to create or update.\n * @param options - The options parameters.\n */\n public async createOrUpdateAlias(\n alias: SearchIndexAlias,\n options: CreateOrUpdateAliasOptions = {}\n ): Promise<SearchIndexAlias> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-createOrUpdateAlias\", options);\n try {\n const etag = options.onlyIfUnchanged ? alias.etag : undefined;\n\n const result = await this.client.aliases.createOrUpdate(alias.name, alias, {\n ...updatedOptions,\n ifMatch: etag,\n });\n return result;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new search alias.\n * @param alias - The definition of the alias to create.\n * @param options - The options parameters.\n */\n public async createAlias(\n alias: SearchIndexAlias,\n options: CreateAliasOptions = {}\n ): Promise<SearchIndexAlias> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-createAlias\", options);\n try {\n const result = await this.client.aliases.create(alias, updatedOptions);\n return result;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no\n * recovery option. The mapped index is untouched by this operation.\n * @param alias - Alias/Name name of the alias to delete.\n * @param options - The options parameters.\n */\n public async deleteAlias(\n alias: string | SearchIndexAlias,\n options: DeleteAliasOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-deleteAlias\", options);\n try {\n const aliasName: string = typeof alias === \"string\" ? alias : alias.name;\n const etag =\n typeof alias === \"string\" ? undefined : options.onlyIfUnchanged ? alias.etag : undefined;\n\n await this.client.aliases.delete(aliasName, {\n ...updatedOptions,\n ifMatch: etag,\n });\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves an alias definition.\n * @param aliasName - The name of the alias to retrieve.\n * @param options - The options parameters.\n */\n public async getAlias(\n aliasName: string,\n options: GetAliasOptions = {}\n ): Promise<SearchIndexAlias> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-getAlias\", options);\n try {\n const result = await this.client.aliases.get(aliasName, updatedOptions);\n return result;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves statistics about an index, such as the count of documents and the size\n * of index storage.\n * @param indexName - The name of the index.\n * @param options - Additional optional arguments.\n */\n public async getIndexStatistics(\n indexName: string,\n options: GetIndexStatisticsOptions = {}\n ): Promise<SearchIndexStatistics> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-getIndexStatistics\", options);\n try {\n const result = await this.client.indexes.getStatistics(indexName, updatedOptions);\n return result;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Calls an analyzer or tokenizer manually on provided text.\n * @param indexName - The name of the index that contains the field to analyze\n * @param text - The text to break into tokens.\n * @param options - Additional arguments\n */\n public async analyzeText(indexName: string, options: AnalyzeTextOptions): Promise<AnalyzeResult> {\n const { abortSignal, requestOptions, tracingOptions, ...restOptions } = options;\n const operationOptions = {\n abortSignal,\n requestOptions,\n tracingOptions,\n };\n\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-analyzeText\", operationOptions);\n try {\n const result = await this.client.indexes.analyze(\n indexName,\n {\n ...restOptions,\n analyzer: restOptions.analyzerName,\n tokenizer: restOptions.tokenizerName,\n normalizer: restOptions.normalizerName,\n },\n updatedOptions\n );\n return result;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves statistics about the service, such as the count of documents, index, etc.\n * @param options - Additional optional arguments.\n */\n public async getServiceStatistics(\n options: GetServiceStatisticsOptions = {}\n ): Promise<SearchServiceStatistics> {\n const { span, updatedOptions } = createSpan(\"SearchIndexClient-getServiceStatistics\", options);\n try {\n const result = await this.client.getServiceStatistics(updatedOptions);\n return result;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves the SearchClient corresponding to this SearchIndexClient\n * @param indexName - Name of the index\n * @param options - SearchClient Options\n */\n public getSearchClient<T>(indexName: string, options?: GetSearchClientOptions): SearchClient<T> {\n return new SearchClient<T>(this.endpoint, indexName, this.credential, options || this.options);\n }\n}\n"]}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
3
|
import { isTokenCredential } from "@azure/core-auth";
|
|
4
4
|
import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline";
|
|
5
|
-
import { SpanStatusCode } from "@azure/core-tracing";
|
|
6
5
|
import { SDK_VERSION } from "./constants";
|
|
7
6
|
import { SearchServiceClient as GeneratedClient } from "./generated/service/searchServiceClient";
|
|
8
7
|
import { logger } from "./logger";
|
|
@@ -101,8 +100,8 @@ export class SearchIndexerClient {
|
|
|
101
100
|
}
|
|
102
101
|
catch (e) {
|
|
103
102
|
span.setStatus({
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
status: "error",
|
|
104
|
+
error: e.message,
|
|
106
105
|
});
|
|
107
106
|
throw e;
|
|
108
107
|
}
|
|
@@ -122,8 +121,8 @@ export class SearchIndexerClient {
|
|
|
122
121
|
}
|
|
123
122
|
catch (e) {
|
|
124
123
|
span.setStatus({
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
status: "error",
|
|
125
|
+
error: e.message,
|
|
127
126
|
});
|
|
128
127
|
throw e;
|
|
129
128
|
}
|
|
@@ -143,8 +142,8 @@ export class SearchIndexerClient {
|
|
|
143
142
|
}
|
|
144
143
|
catch (e) {
|
|
145
144
|
span.setStatus({
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
status: "error",
|
|
146
|
+
error: e.message,
|
|
148
147
|
});
|
|
149
148
|
throw e;
|
|
150
149
|
}
|
|
@@ -164,8 +163,8 @@ export class SearchIndexerClient {
|
|
|
164
163
|
}
|
|
165
164
|
catch (e) {
|
|
166
165
|
span.setStatus({
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
status: "error",
|
|
167
|
+
error: e.message,
|
|
169
168
|
});
|
|
170
169
|
throw e;
|
|
171
170
|
}
|
|
@@ -185,8 +184,8 @@ export class SearchIndexerClient {
|
|
|
185
184
|
}
|
|
186
185
|
catch (e) {
|
|
187
186
|
span.setStatus({
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
status: "error",
|
|
188
|
+
error: e.message,
|
|
190
189
|
});
|
|
191
190
|
throw e;
|
|
192
191
|
}
|
|
@@ -206,8 +205,8 @@ export class SearchIndexerClient {
|
|
|
206
205
|
}
|
|
207
206
|
catch (e) {
|
|
208
207
|
span.setStatus({
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
status: "error",
|
|
209
|
+
error: e.message,
|
|
211
210
|
});
|
|
212
211
|
throw e;
|
|
213
212
|
}
|
|
@@ -228,8 +227,8 @@ export class SearchIndexerClient {
|
|
|
228
227
|
}
|
|
229
228
|
catch (e) {
|
|
230
229
|
span.setStatus({
|
|
231
|
-
|
|
232
|
-
|
|
230
|
+
status: "error",
|
|
231
|
+
error: e.message,
|
|
233
232
|
});
|
|
234
233
|
throw e;
|
|
235
234
|
}
|
|
@@ -250,8 +249,8 @@ export class SearchIndexerClient {
|
|
|
250
249
|
}
|
|
251
250
|
catch (e) {
|
|
252
251
|
span.setStatus({
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
status: "error",
|
|
253
|
+
error: e.message,
|
|
255
254
|
});
|
|
256
255
|
throw e;
|
|
257
256
|
}
|
|
@@ -272,8 +271,8 @@ export class SearchIndexerClient {
|
|
|
272
271
|
}
|
|
273
272
|
catch (e) {
|
|
274
273
|
span.setStatus({
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
status: "error",
|
|
275
|
+
error: e.message,
|
|
277
276
|
});
|
|
278
277
|
throw e;
|
|
279
278
|
}
|
|
@@ -294,8 +293,8 @@ export class SearchIndexerClient {
|
|
|
294
293
|
}
|
|
295
294
|
catch (e) {
|
|
296
295
|
span.setStatus({
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
status: "error",
|
|
297
|
+
error: e.message,
|
|
299
298
|
});
|
|
300
299
|
throw e;
|
|
301
300
|
}
|
|
@@ -316,8 +315,8 @@ export class SearchIndexerClient {
|
|
|
316
315
|
}
|
|
317
316
|
catch (e) {
|
|
318
317
|
span.setStatus({
|
|
319
|
-
|
|
320
|
-
|
|
318
|
+
status: "error",
|
|
319
|
+
error: e.message,
|
|
321
320
|
});
|
|
322
321
|
throw e;
|
|
323
322
|
}
|
|
@@ -338,8 +337,8 @@ export class SearchIndexerClient {
|
|
|
338
337
|
}
|
|
339
338
|
catch (e) {
|
|
340
339
|
span.setStatus({
|
|
341
|
-
|
|
342
|
-
|
|
340
|
+
status: "error",
|
|
341
|
+
error: e.message,
|
|
343
342
|
});
|
|
344
343
|
throw e;
|
|
345
344
|
}
|
|
@@ -361,8 +360,8 @@ export class SearchIndexerClient {
|
|
|
361
360
|
}
|
|
362
361
|
catch (e) {
|
|
363
362
|
span.setStatus({
|
|
364
|
-
|
|
365
|
-
|
|
363
|
+
status: "error",
|
|
364
|
+
error: e.message,
|
|
366
365
|
});
|
|
367
366
|
throw e;
|
|
368
367
|
}
|
|
@@ -384,8 +383,8 @@ export class SearchIndexerClient {
|
|
|
384
383
|
}
|
|
385
384
|
catch (e) {
|
|
386
385
|
span.setStatus({
|
|
387
|
-
|
|
388
|
-
|
|
386
|
+
status: "error",
|
|
387
|
+
error: e.message,
|
|
389
388
|
});
|
|
390
389
|
throw e;
|
|
391
390
|
}
|
|
@@ -407,8 +406,8 @@ export class SearchIndexerClient {
|
|
|
407
406
|
}
|
|
408
407
|
catch (e) {
|
|
409
408
|
span.setStatus({
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
status: "error",
|
|
410
|
+
error: e.message,
|
|
412
411
|
});
|
|
413
412
|
throw e;
|
|
414
413
|
}
|
|
@@ -434,8 +433,8 @@ export class SearchIndexerClient {
|
|
|
434
433
|
}
|
|
435
434
|
catch (e) {
|
|
436
435
|
span.setStatus({
|
|
437
|
-
|
|
438
|
-
|
|
436
|
+
status: "error",
|
|
437
|
+
error: e.message,
|
|
439
438
|
});
|
|
440
439
|
throw e;
|
|
441
440
|
}
|
|
@@ -461,8 +460,8 @@ export class SearchIndexerClient {
|
|
|
461
460
|
}
|
|
462
461
|
catch (e) {
|
|
463
462
|
span.setStatus({
|
|
464
|
-
|
|
465
|
-
|
|
463
|
+
status: "error",
|
|
464
|
+
error: e.message,
|
|
466
465
|
});
|
|
467
466
|
throw e;
|
|
468
467
|
}
|
|
@@ -488,8 +487,8 @@ export class SearchIndexerClient {
|
|
|
488
487
|
}
|
|
489
488
|
catch (e) {
|
|
490
489
|
span.setStatus({
|
|
491
|
-
|
|
492
|
-
|
|
490
|
+
status: "error",
|
|
491
|
+
error: e.message,
|
|
493
492
|
});
|
|
494
493
|
throw e;
|
|
495
494
|
}
|
|
@@ -510,8 +509,8 @@ export class SearchIndexerClient {
|
|
|
510
509
|
}
|
|
511
510
|
catch (e) {
|
|
512
511
|
span.setStatus({
|
|
513
|
-
|
|
514
|
-
|
|
512
|
+
status: "error",
|
|
513
|
+
error: e.message,
|
|
515
514
|
});
|
|
516
515
|
throw e;
|
|
517
516
|
}
|
|
@@ -531,8 +530,8 @@ export class SearchIndexerClient {
|
|
|
531
530
|
}
|
|
532
531
|
catch (e) {
|
|
533
532
|
span.setStatus({
|
|
534
|
-
|
|
535
|
-
|
|
533
|
+
status: "error",
|
|
534
|
+
error: e.message,
|
|
536
535
|
});
|
|
537
536
|
throw e;
|
|
538
537
|
}
|
|
@@ -552,8 +551,8 @@ export class SearchIndexerClient {
|
|
|
552
551
|
}
|
|
553
552
|
catch (e) {
|
|
554
553
|
span.setStatus({
|
|
555
|
-
|
|
556
|
-
|
|
554
|
+
status: "error",
|
|
555
|
+
error: e.message,
|
|
557
556
|
});
|
|
558
557
|
throw e;
|
|
559
558
|
}
|
|
@@ -576,8 +575,8 @@ export class SearchIndexerClient {
|
|
|
576
575
|
}
|
|
577
576
|
catch (e) {
|
|
578
577
|
span.setStatus({
|
|
579
|
-
|
|
580
|
-
|
|
578
|
+
status: "error",
|
|
579
|
+
error: e.message,
|
|
581
580
|
});
|
|
582
581
|
throw e;
|
|
583
582
|
}
|
|
@@ -598,8 +597,8 @@ export class SearchIndexerClient {
|
|
|
598
597
|
}
|
|
599
598
|
catch (e) {
|
|
600
599
|
span.setStatus({
|
|
601
|
-
|
|
602
|
-
|
|
600
|
+
status: "error",
|
|
601
|
+
error: e.message,
|
|
603
602
|
});
|
|
604
603
|
throw e;
|
|
605
604
|
}
|