Share via


StopAnalyzer Class

public final class StopAnalyzer
extends LexicalAnalyzer

Divides text at non-letters; Applies the lowercase and stopword token filters. This analyzer is implemented using Apache Lucene.

Constructor Summary

Constructor Description
StopAnalyzer(String name)

Creates an instance of StopAnalyzer class.

Method Summary

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

Reads an instance of StopAnalyzer from the JsonReader.

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.

StopAnalyzer setStopwords(List<String> stopwords)

Set the stopwords property: A list of stopwords.

StopAnalyzer 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

StopAnalyzer

public StopAnalyzer(String name)

Creates an instance of StopAnalyzer class.

Parameters:

name - the name value to set.

Method Details

fromJson

public static StopAnalyzer fromJson(JsonReader jsonReader)

Reads an instance of StopAnalyzer from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getOdataType

public String getOdataType()

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

Overrides:

StopAnalyzer.getOdataType()

Returns:

the odataType value.

getStopwords

public List<String> getStopwords()

Get the stopwords property: A list of stopwords.

Returns:

the stopwords value.

setStopwords

public StopAnalyzer setStopwords(List<String> stopwords)

Set the stopwords property: A list of stopwords.

Parameters:

stopwords - the stopwords value to set.

Returns:

the StopAnalyzer object itself.

setStopwords

public StopAnalyzer setStopwords(String[] stopwords)

Set the stopwords property: A list of stopwords.

Parameters:

stopwords - the stopwords value to set.

Returns:

the StopAnalyzer object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

StopAnalyzer.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to