Class StemmerOverrideFilter.Builder
- java.lang.Object
-
- org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter.Builder
-
- Enclosing class:
- StemmerOverrideFilter
public static class StemmerOverrideFilter.Builder extends Object
This builder builds anFST
for theStemmerOverrideFilter
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a newStemmerOverrideFilter.Builder
with ignoreCase set tofalse
Builder(boolean ignoreCase)
Creates a newStemmerOverrideFilter.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(CharSequence input, CharSequence output)
Adds an input string and its stemmer override output to this builder.StemmerOverrideFilter.StemmerOverrideMap
build()
Returns anStemmerOverrideFilter.StemmerOverrideMap
to be used with theStemmerOverrideFilter
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a newStemmerOverrideFilter.Builder
with ignoreCase set tofalse
-
Builder
public Builder(boolean ignoreCase)
Creates a newStemmerOverrideFilter.Builder
- Parameters:
ignoreCase
- if the input case should be ignored.
-
-
Method Detail
-
add
public boolean add(CharSequence input, CharSequence output)
Adds an input string and its stemmer override output to this builder.- Parameters:
input
- the input char sequenceoutput
- the stemmer override output char sequence- Returns:
false
iff the input has already been added to this builder otherwisetrue
.
-
build
public StemmerOverrideFilter.StemmerOverrideMap build() throws IOException
Returns anStemmerOverrideFilter.StemmerOverrideMap
to be used with theStemmerOverrideFilter
- Returns:
- an
StemmerOverrideFilter.StemmerOverrideMap
to be used with theStemmerOverrideFilter
- Throws:
IOException
- if anIOException
occurs;
-
-