SearchIndexClient.AnalyzeText 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 |
|---|---|
| AnalyzeText(String, RequestContent, RequestContext) |
[Protocol Method] Shows how an analyzer breaks text into tokens.
|
| AnalyzeText(String, AnalyzeTextOptions, CancellationToken) |
Shows how an analyzer breaks text into tokens. |
AnalyzeText(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 Azure.Response AnalyzeText(string indexName, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member AnalyzeText : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.AnalyzeText : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function AnalyzeText (indexName As String, content As RequestContent, Optional context As RequestContext = Nothing) As 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.
Applies to
AnalyzeText(String, AnalyzeTextOptions, CancellationToken)
- Source:
- SearchIndexClient.cs
- Source:
- SearchIndexClient.cs
Shows how an analyzer breaks text into tokens.
public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Search.Documents.Indexes.Models.AnalyzedTokenInfo>> AnalyzeText(string indexName, Azure.Search.Documents.Indexes.Models.AnalyzeTextOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member AnalyzeText : string * Azure.Search.Documents.Indexes.Models.AnalyzeTextOptions * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Search.Documents.Indexes.Models.AnalyzedTokenInfo>>
override this.AnalyzeText : string * Azure.Search.Documents.Indexes.Models.AnalyzeTextOptions * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Search.Documents.Indexes.Models.AnalyzedTokenInfo>>
Public Overridable Function AnalyzeText (indexName As String, options As AnalyzeTextOptions, Optional cancellationToken As CancellationToken = Nothing) As 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.