Class QueryConfigHandler
java.lang.Object
org.apache.lucene.queryparser.flexible.core.config.AbstractQueryConfig
org.apache.lucene.queryparser.flexible.core.config.QueryConfigHandler
- Direct Known Subclasses:
StandardQueryConfigHandler
This class can be used to hold any query configuration and no field configuration. For field
configuration, it creates an empty
FieldConfig
object and delegate it to field config
listeners, these are responsible for setting up all the field configuration.
QueryConfigHandler
should be extended by classes that intend to provide configuration
to QueryNodeProcessor
objects.
The class that extends QueryConfigHandler
should also provide FieldConfig
objects for each collection field.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldConfigListener
(FieldConfigListener listener) Adds a listener.getFieldConfig
(String fieldName) Returns an implementation ofFieldConfig
for a specific field name.Methods inherited from class org.apache.lucene.queryparser.flexible.core.config.AbstractQueryConfig
get, has, set, unset
-
Constructor Details
-
QueryConfigHandler
public QueryConfigHandler()
-
-
Method Details
-
getFieldConfig
Returns an implementation ofFieldConfig
for a specific field name. If the implementedQueryConfigHandler
does not know a specific field name, it may returnnull
, indicating there is no configuration for that field.- Parameters:
fieldName
- the field name- Returns:
- a
FieldConfig
object containing the field name configuration ornull
, if the implementedQueryConfigHandler
has no configuration for that field
-
addFieldConfigListener
Adds a listener. The added listeners are called in the order they are added.- Parameters:
listener
- the listener to be added
-