LuceneStandardAnalyzer Class

public final class LuceneStandardAnalyzer
extends LexicalAnalyzer

Standard Apache Lucene analyzer; Composed of the standard tokenizer, lowercase filter and stop filter.

Constructor Summary

Constructor Description
LuceneStandardAnalyzer(String name)

Creates an instance of LuceneStandardAnalyzer class.

Method Summary

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

Reads an instance of LuceneStandardAnalyzer from the JsonReader.

Integer getMaxTokenLength()

Get the maxTokenLength property: The maximum token length.

String getOdataType()

Get the odataType property: A URI fragment specifying the type of analyzer.

List<String> getStopwords()

Get the stopwords property: A list of stopwords.

LuceneStandardAnalyzer setMaxTokenLength(Integer maxTokenLength)

Set the maxTokenLength property: The maximum token length.

LuceneStandardAnalyzer setStopwords(List<String> stopwords)

Set the stopwords property: A list of stopwords.

LuceneStandardAnalyzer setStopwords(String[] stopwords)

Set the stopwords property: A list of stopwords.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from LexicalAnalyzer

Methods inherited from java.lang.Object

Constructor Details

LuceneStandardAnalyzer

public LuceneStandardAnalyzer(String name)

Creates an instance of LuceneStandardAnalyzer class.

Parameters:

name - the name value to set.

Method Details

fromJson

public static LuceneStandardAnalyzer fromJson(JsonReader jsonReader)

Reads an instance of LuceneStandardAnalyzer from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of LuceneStandardAnalyzer 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 255. 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: A URI fragment specifying the type of analyzer.

Overrides:

LuceneStandardAnalyzer.getOdataType()

Returns:

the odataType value.

getStopwords

public List<String> getStopwords()

Get the stopwords property: A list of stopwords.

Returns:

the stopwords value.

setMaxTokenLength

public LuceneStandardAnalyzer setMaxTokenLength(Integer maxTokenLength)

Set the maxTokenLength property: The maximum token length. Default is 255. 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 LuceneStandardAnalyzer object itself.

setStopwords

public LuceneStandardAnalyzer setStopwords(List<String> stopwords)

Set the stopwords property: A list of stopwords.

Parameters:

stopwords - the stopwords value to set.

Returns:

the LuceneStandardAnalyzer object itself.

setStopwords

public LuceneStandardAnalyzer setStopwords(String[] stopwords)

Set the stopwords property: A list of stopwords.

Parameters:

stopwords - the stopwords value to set.

Returns:

the LuceneStandardAnalyzer object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

LuceneStandardAnalyzer.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to