AnalyzeTextOptions Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.AnalyzeTextOptions

Implements

public final class AnalyzeTextOptions
implements JsonSerializable<AnalyzeTextOptions>

Specifies some text and analysis components used to break that text into tokens.

Constructor Summary

Constructor Description
AnalyzeTextOptions(String text)

Creates an instance of AnalyzeTextOptions class.

Method Summary

Modifier and Type Method and Description
static AnalyzeTextOptions fromJson(JsonReader jsonReader)

Reads an instance of AnalyzeTextOptions from the JsonReader.

LexicalAnalyzerName getAnalyzerName()

Get the analyzerName property: The name of the analyzer to use to break the given text.

List<CharFilterName> getCharFilters()

Get the charFilters property: An optional list of character filters to use when breaking the given text.

LexicalNormalizerName getNormalizerName()

Get the normalizerName property: The name of the normalizer to use to normalize the given text.

String getText()

Get the text property: The text to break into tokens.

List<TokenFilterName> getTokenFilters()

Get the tokenFilters property: An optional list of token filters to use when breaking the given text.

LexicalTokenizerName getTokenizerName()

Get the tokenizerName property: The name of the tokenizer to use to break the given text.

AnalyzeTextOptions setAnalyzerName(LexicalAnalyzerName analyzerName)

Set the analyzerName property: The name of the analyzer to use to break the given text.

AnalyzeTextOptions setCharFilters(CharFilterName[] charFilters)

Set the charFilters property: An optional list of character filters to use when breaking the given text.

AnalyzeTextOptions setCharFilters(List<CharFilterName> charFilters)

Set the charFilters property: An optional list of character filters to use when breaking the given text.

AnalyzeTextOptions setNormalizerName(LexicalNormalizerName normalizerName)

Set the normalizerName property: The name of the normalizer to use to normalize the given text.

AnalyzeTextOptions setTokenFilters(List<TokenFilterName> tokenFilters)

Set the tokenFilters property: An optional list of token filters to use when breaking the given text.

AnalyzeTextOptions setTokenFilters(TokenFilterName[] tokenFilters)

Set the tokenFilters property: An optional list of token filters to use when breaking the given text.

AnalyzeTextOptions setTokenizerName(LexicalTokenizerName tokenizerName)

Set the tokenizerName property: The name of the tokenizer to use to break the given text.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

AnalyzeTextOptions

public AnalyzeTextOptions(String text)

Creates an instance of AnalyzeTextOptions class.

Parameters:

text - the text value to set.

Method Details

fromJson

public static AnalyzeTextOptions fromJson(JsonReader jsonReader)

Reads an instance of AnalyzeTextOptions from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AnalyzeTextOptions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getAnalyzerName

public LexicalAnalyzerName getAnalyzerName()

Get the analyzerName property: 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 exclusive.

Returns:

the analyzerName value.

getCharFilters

public List<CharFilterName> getCharFilters()

Get the charFilters property: An optional list of character filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter.

Returns:

the charFilters value.

getNormalizerName

public LexicalNormalizerName getNormalizerName()

Get the normalizerName property: The name of the normalizer to use to normalize the given text.

Returns:

the normalizerName value.

getText

public String getText()

Get the text property: The text to break into tokens.

Returns:

the text value.

getTokenFilters

public List<TokenFilterName> getTokenFilters()

Get the tokenFilters property: An optional list of token filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter.

Returns:

the tokenFilters value.

getTokenizerName

public LexicalTokenizerName getTokenizerName()

Get the tokenizerName property: The name of the tokenizer to use to break the given text. If this parameter is not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters are mutually exclusive.

Returns:

the tokenizerName value.

setAnalyzerName

public AnalyzeTextOptions setAnalyzerName(LexicalAnalyzerName analyzerName)

Set the analyzerName property: 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 exclusive.

Parameters:

analyzerName - the analyzerName value to set.

Returns:

the AnalyzeTextOptions object itself.

setCharFilters

public AnalyzeTextOptions setCharFilters(CharFilterName[] charFilters)

Set the charFilters property: An optional list of character filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter.

Parameters:

charFilters - the charFilters value to set.

Returns:

the AnalyzeTextOptions object itself.

setCharFilters

public AnalyzeTextOptions setCharFilters(List<CharFilterName> charFilters)

Set the charFilters property: An optional list of character filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter.

Parameters:

charFilters - the charFilters value to set.

Returns:

the AnalyzeTextOptions object itself.

setNormalizerName

public AnalyzeTextOptions setNormalizerName(LexicalNormalizerName normalizerName)

Set the normalizerName property: The name of the normalizer to use to normalize the given text.

Parameters:

normalizerName - the normalizerName value to set.

Returns:

the AnalyzeTextOptions object itself.

setTokenFilters

public AnalyzeTextOptions setTokenFilters(List<TokenFilterName> tokenFilters)

Set the tokenFilters property: An optional list of token filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter.

Parameters:

tokenFilters - the tokenFilters value to set.

Returns:

the AnalyzeTextOptions object itself.

setTokenFilters

public AnalyzeTextOptions setTokenFilters(TokenFilterName[] tokenFilters)

Set the tokenFilters property: An optional list of token filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter.

Parameters:

tokenFilters - the tokenFilters value to set.

Returns:

the AnalyzeTextOptions object itself.

setTokenizerName

public AnalyzeTextOptions setTokenizerName(LexicalTokenizerName tokenizerName)

Set the tokenizerName property: The name of the tokenizer to use to break the given text. If this parameter is not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters are mutually exclusive.

Parameters:

tokenizerName - the tokenizerName value to set.

Returns:

the AnalyzeTextOptions object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to