KeywordTokenizerV2 Class

public final class KeywordTokenizerV2
extends LexicalTokenizer

Emits the entire input as a single token. This tokenizer is implemented using Apache Lucene.

Constructor Summary

Constructor Description
KeywordTokenizerV2(String name)

Creates an instance of KeywordTokenizerV2 class.

Method Summary

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

Reads an instance of KeywordTokenizerV2 from the JsonReader.

Integer getMaxTokenLength()

Get the maxTokenLength property: The maximum token length.

String getOdataType()

Get the odataType property: The discriminator for derived types.

KeywordTokenizerV2 setMaxTokenLength(Integer maxTokenLength)

Set the maxTokenLength property: The maximum token length.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from LexicalTokenizer

Methods inherited from java.lang.Object

Constructor Details

KeywordTokenizerV2

public KeywordTokenizerV2(String name)

Creates an instance of KeywordTokenizerV2 class.

Parameters:

name - the name value to set.

Method Details

fromJson

public static KeywordTokenizerV2 fromJson(JsonReader jsonReader)

Reads an instance of KeywordTokenizerV2 from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KeywordTokenizerV2 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.

getMaxTokenLength

public Integer getMaxTokenLength()

Get the maxTokenLength property: The maximum token length. Default is 256. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters.

Returns:

the maxTokenLength value.

getOdataType

public String getOdataType()

Get the odataType property: The discriminator for derived types.

Overrides:

KeywordTokenizerV2.getOdataType()

Returns:

the odataType value.

setMaxTokenLength

public KeywordTokenizerV2 setMaxTokenLength(Integer maxTokenLength)

Set the maxTokenLength property: The maximum token length. Default is 256. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters.

Parameters:

maxTokenLength - the maxTokenLength value to set.

Returns:

the KeywordTokenizerV2 object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

KeywordTokenizerV2.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to