Class MultiFieldQueryNodeProcessor
This processor is used to expand terms so the query looks for the same term in different fields. It also boosts a query based on its field.
This processor looks for every IFieldableNode contained in the query node tree. If a IFieldableNode is found, it checks if there is a MULTI_FIELDS defined in the QueryConfigHandler. If there is, the IFieldableNode is cloned N times and the clones are added to a BooleanQueryNode together with the original node. N is defined by the number of fields that it will be expanded to. The BooleanQueryNode is returned.Implements
Inherited Members
Namespace: Lucene.Net.QueryParsers.Flexible.Standard.Processors
Assembly: Lucene.Net.QueryParser.dll
Syntax
public class MultiFieldQueryNodeProcessor : QueryNodeProcessor, IQueryNodeProcessor
Constructors
MultiFieldQueryNodeProcessor()
This processor is used to expand terms so the query looks for the same term in different fields. It also boosts a query based on its field.
This processor looks for every IFieldableNode contained in the query node tree. If a IFieldableNode is found, it checks if there is a MULTI_FIELDS defined in the QueryConfigHandler. If there is, the IFieldableNode is cloned N times and the clones are added to a BooleanQueryNode together with the original node. N is defined by the number of fields that it will be expanded to. The BooleanQueryNode is returned.Declaration
public MultiFieldQueryNodeProcessor()
See Also
Methods
PostProcessNode(IQueryNode)
This method is invoked for every node when walking up the tree.
Declaration
protected override IQueryNode PostProcessNode(IQueryNode node)
Parameters
Type | Name | Description |
---|---|---|
IQueryNode | node | node the query node to be post-processed |
Returns
Type | Description |
---|---|
IQueryNode | a query node |
Overrides
Exceptions
Type | Condition |
---|---|
QueryNodeException | if something goes wrong during the query node processing |
See Also
PreProcessNode(IQueryNode)
This method is invoked for every node when walking down the tree.
Declaration
protected override IQueryNode PreProcessNode(IQueryNode node)
Parameters
Type | Name | Description |
---|---|---|
IQueryNode | node | the query node to be pre-processed |
Returns
Type | Description |
---|---|
IQueryNode | a query node |
Overrides
Exceptions
Type | Condition |
---|---|
QueryNodeException | if something goes wrong during the query node processing |
See Also
ProcessChildren(IQueryNode)
This method is called every time a child is processed.
Declaration
protected override void ProcessChildren(IQueryNode queryTree)
Parameters
Type | Name | Description |
---|---|---|
IQueryNode | queryTree | the query node child to be processed |
Overrides
Exceptions
Type | Condition |
---|---|
QueryNodeException | if something goes wrong during the query node processing |
See Also
SetChildrenOrder(IList<IQueryNode>)
This method is invoked for every node that has at least on child. It's invoked right before PostProcessNode(IQueryNode) is invoked.
Declaration
protected override IList<IQueryNode> SetChildrenOrder(IList<IQueryNode> children)
Parameters
Type | Name | Description |
---|---|---|
IList<IQueryNode> | children | the list containing all current node's children |
Returns
Type | Description |
---|---|
IList<IQueryNode> | a new list containing all children that should be set to the current node |
Overrides
Exceptions
Type | Condition |
---|---|
QueryNodeException | if something goes wrong during the query node processing |