diff --git a/sdk/search/search-documents/review/search-documents.api.md b/sdk/search/search-documents/review/search-documents.api.md index a1ead6a9eda6..6cccd9663f89 100644 --- a/sdk/search/search-documents/review/search-documents.api.md +++ b/sdk/search/search-documents/review/search-documents.api.md @@ -22,6 +22,7 @@ export interface AnalyzedTokenInfo { export interface AnalyzeRequest { analyzerName?: string; charFilters?: string[]; + text: string; tokenFilters?: string[]; tokenizerName?: string; } @@ -1047,7 +1048,7 @@ export interface SearchIndex { // @public export class SearchIndexClient { constructor(endpoint: string, credential: KeyCredential, options?: SearchIndexClientOptions); - analyzeText(indexName: string, text: string, options: AnalyzeTextOptions): Promise; + analyzeText(indexName: string, options: AnalyzeTextOptions): Promise; readonly apiVersion: string; createIndex(index: SearchIndex, options?: CreateIndexOptions): Promise; createOrUpdateIndex(index: SearchIndex, options?: CreateOrUpdateIndexOptions): Promise; diff --git a/sdk/search/search-documents/src/searchIndexClient.ts b/sdk/search/search-documents/src/searchIndexClient.ts index 2bbc43b32c81..cc7a8799c627 100644 --- a/sdk/search/search-documents/src/searchIndexClient.ts +++ b/sdk/search/search-documents/src/searchIndexClient.ts @@ -568,11 +568,7 @@ export class SearchIndexClient { * @param text The text to break into tokens. * @param options Additional arguments */ - public async analyzeText( - indexName: string, - text: string, - options: AnalyzeTextOptions - ): Promise { + public async analyzeText(indexName: string, options: AnalyzeTextOptions): Promise { const { operationOptions, restOptions } = utils.extractOperationOptions(options); const { span, updatedOptions } = createSpan("SearchIndexClient-analyzeText", operationOptions); @@ -581,7 +577,6 @@ export class SearchIndexClient { indexName, { ...restOptions, - text, analyzer: restOptions.analyzerName, tokenizer: restOptions.tokenizerName }, diff --git a/sdk/search/search-documents/src/serviceModels.ts b/sdk/search/search-documents/src/serviceModels.ts index 485b9ff2fa4f..45da5470f570 100644 --- a/sdk/search/search-documents/src/serviceModels.ts +++ b/sdk/search/search-documents/src/serviceModels.ts @@ -315,6 +315,10 @@ export interface DeleteDataSourceConnectionOptions extends OperationOptions { * Specifies some text and analysis components used to break that text into tokens. */ export interface AnalyzeRequest { + /** + * The text to break into tokens. + */ + text: string; /** * The name of the analyzer to use to break the given text. If this parameter is not specified, * you must specify a tokenizer instead. The tokenizer and analyzer parameters are mutually