Class CustomAnalyzer.ConditionBuilder
java.lang.Object
org.apache.lucene.analysis.custom.CustomAnalyzer.ConditionBuilder
- Enclosing class:
CustomAnalyzer
Factory class for a
ConditionalTokenFilter-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConditionalTokenFilterFactoryprivate final List<TokenFilterFactory> private final CustomAnalyzer.Builder -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConditionBuilder(ConditionalTokenFilterFactory factory, CustomAnalyzer.Builder parent) -
Method Summary
Modifier and TypeMethodDescriptionaddTokenFilter(Class<? extends TokenFilterFactory> factory, String... params) Adds the given token filter.addTokenFilter(Class<? extends TokenFilterFactory> factory, Map<String, String> params) Adds the given token filter.addTokenFilter(String name, String... params) Adds the given token filter.addTokenFilter(String name, Map<String, String> params) Adds the given token filter.endwhen()Close the branch and return to the main analysis chain
-
Field Details
-
innerFilters
-
factory
-
parent
-
-
Constructor Details
-
ConditionBuilder
-
-
Method Details
-
addTokenFilter
public CustomAnalyzer.ConditionBuilder addTokenFilter(String name, Map<String, String> params) throws IOExceptionAdds 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 IOExceptionAdds 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
Close the branch and return to the main analysis chain- Throws:
IOException
-