Class QueryConfigHandler
- java.lang.Object
-
- org.apache.lucene.util.AttributeSource
-
- org.apache.lucene.queryParser.core.config.AbstractQueryConfig
-
- org.apache.lucene.queryParser.core.config.QueryConfigHandler
-
- Direct Known Subclasses:
StandardQueryConfigHandler
public abstract class QueryConfigHandler extends AbstractQueryConfig
This class can be used to hold any query configuration and no field configuration. For field configuration, it creates a emptyFieldConfigobject and delegate it to field config listeners, these are responsible for setting up all the field configuration.QueryConfigHandlershould be extended by classes that intends to provide configuration toQueryNodeProcessorobjects. This class extendsAttributeSource, soAttributes can be attached to it. The class that extendsQueryConfigHandlershould also provideFieldConfigobjects for each collection field.- See Also:
Attribute,FieldConfig,FieldConfigListener,QueryConfigHandler
-
-
Constructor Summary
Constructors Constructor Description QueryConfigHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddFieldConfigListener(FieldConfigListener listener)Adds a listener.FieldConfiggetFieldConfig(CharSequence fieldName)Deprecated.usegetFieldConfig(String)insteadFieldConfiggetFieldConfig(String fieldName)Returns an implementation ofFieldConfigfor a specific field name.-
Methods inherited from class org.apache.lucene.queryParser.core.config.AbstractQueryConfig
addAttribute, get, get, has, set, unset
-
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
-
-
-
-
Method Detail
-
getFieldConfig
@Deprecated public FieldConfig getFieldConfig(CharSequence fieldName)
Deprecated.usegetFieldConfig(String)insteadReturns an implementation ofFieldConfigfor a specific field name. If the implementedQueryConfigHandlerdoes not know a specific field name, it may returnnull, indicating there is no configuration for that field.- Parameters:
fieldName- the field name- Returns:
- a
FieldConfigobject containing the field name configuration ornull, if the implementedQueryConfigHandlerhas no configuration for that field
-
getFieldConfig
public FieldConfig getFieldConfig(String fieldName)
Returns an implementation ofFieldConfigfor a specific field name. If the implementedQueryConfigHandlerdoes not know a specific field name, it may returnnull, indicating there is no configuration for that field.- Parameters:
fieldName- the field name- Returns:
- a
FieldConfigobject containing the field name configuration ornull, if the implementedQueryConfigHandlerhas no configuration for that field
-
addFieldConfigListener
public void addFieldConfigListener(FieldConfigListener listener)
Adds a listener. The added listeners are called in the order they are added.- Parameters:
listener- the listener to be added
-
-