Class CustomAnalyzer.ConditionBuilder
- java.lang.Object
-
- org.apache.lucene.analysis.custom.CustomAnalyzer.ConditionBuilder
-
- Enclosing class:
- CustomAnalyzer
public static class CustomAnalyzer.ConditionBuilder extends Object
Factory class for aConditionalTokenFilter
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomAnalyzer.ConditionBuilder
addTokenFilter(Class<? extends TokenFilterFactory> factory, String... params)
Adds the given token filter.CustomAnalyzer.ConditionBuilder
addTokenFilter(Class<? extends TokenFilterFactory> factory, Map<String,String> params)
Adds the given token filter.CustomAnalyzer.ConditionBuilder
addTokenFilter(String name, String... params)
Adds the given token filter.CustomAnalyzer.ConditionBuilder
addTokenFilter(String name, Map<String,String> params)
Adds the given token filter.CustomAnalyzer.Builder
endwhen()
Close the branch and return to the main analysis chain
-
-
-
Method Detail
-
addTokenFilter
public CustomAnalyzer.ConditionBuilder addTokenFilter(String name, Map<String,String> params) throws IOException
Adds the given token filter.- Parameters:
name
- is used to look up the factory withTokenFilterFactory.forName(String, Map)
. The list of possible names can be looked up withTokenFilterFactory.availableTokenFilters()
.params
- the map of parameters to be passed to factory. The map must be modifiable.- Throws:
IOException
-
addTokenFilter
public CustomAnalyzer.ConditionBuilder addTokenFilter(String name, String... params) throws IOException
Adds the given token filter.- Parameters:
name
- is used to look up the factory withTokenFilterFactory.forName(String, Map)
. The list of possible names can be looked up withTokenFilterFactory.availableTokenFilters()
.params
- the map of parameters to be passed to factory. The map must be modifiable.- Throws:
IOException
-
addTokenFilter
public CustomAnalyzer.ConditionBuilder addTokenFilter(Class<? extends TokenFilterFactory> factory, Map<String,String> params) throws IOException
Adds the given token filter.- Parameters:
factory
- class that is used to create the token filter.params
- the map of parameters to be passed to factory. The map must be modifiable.- Throws:
IOException
-
addTokenFilter
public CustomAnalyzer.ConditionBuilder addTokenFilter(Class<? extends TokenFilterFactory> factory, String... params) throws IOException
Adds the given token filter.- Parameters:
factory
- class that is used to create the token filter.params
- the map of parameters to be passed to factory. The map must be modifiable.- Throws:
IOException
-
endwhen
public CustomAnalyzer.Builder endwhen() throws IOException
Close the branch and return to the main analysis chain- Throws:
IOException
-
-