SearchIndexClient.AnalyzeTextAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| AnalyzeTextAsync(String, AnalyzeTextOptions, CancellationToken) |
Shows how an analyzer breaks text into tokens. |
| AnalyzeTextAsync(String, RequestContent, RequestContext) |
[Protocol Method] Shows how an analyzer breaks text into tokens.
|
AnalyzeTextAsync(String, AnalyzeTextOptions, CancellationToken)
- Source:
- SearchIndexClient.cs
- Source:
- SearchIndexClient.cs
Shows how an analyzer breaks text into tokens.
public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Search.Documents.Indexes.Models.AnalyzedTokenInfo>>> AnalyzeTextAsync(string indexName, Azure.Search.Documents.Indexes.Models.AnalyzeTextOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member AnalyzeTextAsync : string * Azure.Search.Documents.Indexes.Models.AnalyzeTextOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Search.Documents.Indexes.Models.AnalyzedTokenInfo>>>
override this.AnalyzeTextAsync : string * Azure.Search.Documents.Indexes.Models.AnalyzeTextOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Search.Documents.Indexes.Models.AnalyzedTokenInfo>>>
Public Overridable Function AnalyzeTextAsync (indexName As String, options As AnalyzeTextOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of IReadOnlyList(Of AnalyzedTokenInfo)))
Parameters
- indexName
- String
The name of the index used to test an analyzer.
- options
- AnalyzeTextOptions
The AnalyzeTextOptions containing the text and analyzer or analyzer components to test.
- cancellationToken
- CancellationToken
Optional CancellationToken to propagate notifications that the operation should be canceled.
Returns
The Response<T> from the server containing a list of AnalyzedTokenInfo for analyzed text.
Exceptions
Thrown when indexName or options is null.
Thrown when a failure is returned by the Search service.
Applies to
AnalyzeTextAsync(String, RequestContent, RequestContext)
- Source:
- SearchIndexClient.cs
- Source:
- SearchIndexClient.cs
[Protocol Method] Shows how an analyzer breaks text into tokens.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> AnalyzeTextAsync(string indexName, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member AnalyzeTextAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.AnalyzeTextAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function AnalyzeTextAsync (indexName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)
Parameters
- indexName
- String
The name of the index.
- content
- RequestContent
The content to send as the body of the request.
- context
- RequestContext
The request options, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
indexName or content is null.
indexName is an empty string, and was expected to be non-empty.
Service returned a non-success status code.