Class BooleanQuery2ModifierNodeProcessor
This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children. This is a variant of BooleanModifiersQueryNodeProcessor which ignores precedence.
The StandardSyntaxParser knows the rules of precedence, but lucene does not. e.g.(A AND B OR C AND D) ist treated like
(+A +B +C +D).
This processor walks through the query node tree looking for
BooleanQueryNodes. If an AndQueryNode is found, every child,
which is not a ModifierQueryNode or the ModifierQueryNode is
MOD_NONE, becomes a MOD_REQ. For default
BooleanQueryNode, it checks the default operator is
AND, if it is, the same operation when an
AndQueryNode is found is applied to it. Each BooleanQueryNode
which direct parent is also a BooleanQueryNode is removed (to ignore
the rules of precedence).
Implements
Inherited Members
Namespace: Lucene.Net.QueryParsers.Flexible.Standard.Processors
Assembly: Lucene.Net.QueryParser.dll
Syntax
public class BooleanQuery2ModifierNodeProcessor : IQueryNodeProcessor
  Constructors
BooleanQuery2ModifierNodeProcessor()
This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children. This is a variant of BooleanModifiersQueryNodeProcessor which ignores precedence.
The StandardSyntaxParser knows the rules of precedence, but lucene does not. e.g.(A AND B OR C AND D) ist treated like
(+A +B +C +D).
This processor walks through the query node tree looking for
BooleanQueryNodes. If an AndQueryNode is found, every child,
which is not a ModifierQueryNode or the ModifierQueryNode is
MOD_NONE, becomes a MOD_REQ. For default
BooleanQueryNode, it checks the default operator is
AND, if it is, the same operation when an
AndQueryNode is found is applied to it. Each BooleanQueryNode
which direct parent is also a BooleanQueryNode is removed (to ignore
the rules of precedence).
Declaration
public BooleanQuery2ModifierNodeProcessor()
  See Also
Methods
FillChildrenBufferAndApplyModifiery(IQueryNode)
This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children. This is a variant of BooleanModifiersQueryNodeProcessor which ignores precedence.
The StandardSyntaxParser knows the rules of precedence, but lucene does not. e.g.(A AND B OR C AND D) ist treated like
(+A +B +C +D).
This processor walks through the query node tree looking for
BooleanQueryNodes. If an AndQueryNode is found, every child,
which is not a ModifierQueryNode or the ModifierQueryNode is
MOD_NONE, becomes a MOD_REQ. For default
BooleanQueryNode, it checks the default operator is
AND, if it is, the same operation when an
AndQueryNode is found is applied to it. Each BooleanQueryNode
which direct parent is also a BooleanQueryNode is removed (to ignore
the rules of precedence).
Declaration
protected virtual void FillChildrenBufferAndApplyModifiery(IQueryNode parent)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IQueryNode | parent | 
See Also
GetQueryConfigHandler()
Returns the QueryConfigHandler associated to the query tree if any,
otherwise it returns null
Declaration
public virtual QueryConfigHandler GetQueryConfigHandler()
  Returns
| Type | Description | 
|---|---|
| QueryConfigHandler | the QueryConfigHandler associated to the query tree if any,
otherwise it returns   | 
      
See Also
IsDefaultBooleanQueryNode(IQueryNode)
This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children. This is a variant of BooleanModifiersQueryNodeProcessor which ignores precedence.
The StandardSyntaxParser knows the rules of precedence, but lucene does not. e.g.(A AND B OR C AND D) ist treated like
(+A +B +C +D).
This processor walks through the query node tree looking for
BooleanQueryNodes. If an AndQueryNode is found, every child,
which is not a ModifierQueryNode or the ModifierQueryNode is
MOD_NONE, becomes a MOD_REQ. For default
BooleanQueryNode, it checks the default operator is
AND, if it is, the same operation when an
AndQueryNode is found is applied to it. Each BooleanQueryNode
which direct parent is also a BooleanQueryNode is removed (to ignore
the rules of precedence).
Declaration
protected virtual bool IsDefaultBooleanQueryNode(IQueryNode toTest)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IQueryNode | toTest | 
Returns
| Type | Description | 
|---|---|
| bool | 
See Also
PostProcessNode(IQueryNode)
This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children. This is a variant of BooleanModifiersQueryNodeProcessor which ignores precedence.
The StandardSyntaxParser knows the rules of precedence, but lucene does not. e.g.(A AND B OR C AND D) ist treated like
(+A +B +C +D).
This processor walks through the query node tree looking for
BooleanQueryNodes. If an AndQueryNode is found, every child,
which is not a ModifierQueryNode or the ModifierQueryNode is
MOD_NONE, becomes a MOD_REQ. For default
BooleanQueryNode, it checks the default operator is
AND, if it is, the same operation when an
AndQueryNode is found is applied to it. Each BooleanQueryNode
which direct parent is also a BooleanQueryNode is removed (to ignore
the rules of precedence).
Declaration
protected virtual IQueryNode PostProcessNode(IQueryNode node)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IQueryNode | node | 
Returns
| Type | Description | 
|---|---|
| IQueryNode | 
See Also
PreProcessNode(IQueryNode)
This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children. This is a variant of BooleanModifiersQueryNodeProcessor which ignores precedence.
The StandardSyntaxParser knows the rules of precedence, but lucene does not. e.g.(A AND B OR C AND D) ist treated like
(+A +B +C +D).
This processor walks through the query node tree looking for
BooleanQueryNodes. If an AndQueryNode is found, every child,
which is not a ModifierQueryNode or the ModifierQueryNode is
MOD_NONE, becomes a MOD_REQ. For default
BooleanQueryNode, it checks the default operator is
AND, if it is, the same operation when an
AndQueryNode is found is applied to it. Each BooleanQueryNode
which direct parent is also a BooleanQueryNode is removed (to ignore
the rules of precedence).
Declaration
protected virtual IQueryNode PreProcessNode(IQueryNode node)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IQueryNode | node | 
Returns
| Type | Description | 
|---|---|
| IQueryNode | 
See Also
Process(IQueryNode)
Processes a query node tree. It may return the same or another query tree.
I should never return null.
Declaration
public virtual IQueryNode Process(IQueryNode queryTree)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IQueryNode | queryTree | tree root node  | 
      
Returns
| Type | Description | 
|---|---|
| IQueryNode | the processed query tree  | 
      
See Also
ProcessChildren(IQueryNode)
This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children. This is a variant of BooleanModifiersQueryNodeProcessor which ignores precedence.
The StandardSyntaxParser knows the rules of precedence, but lucene does not. e.g.(A AND B OR C AND D) ist treated like
(+A +B +C +D).
This processor walks through the query node tree looking for
BooleanQueryNodes. If an AndQueryNode is found, every child,
which is not a ModifierQueryNode or the ModifierQueryNode is
MOD_NONE, becomes a MOD_REQ. For default
BooleanQueryNode, it checks the default operator is
AND, if it is, the same operation when an
AndQueryNode is found is applied to it. Each BooleanQueryNode
which direct parent is also a BooleanQueryNode is removed (to ignore
the rules of precedence).
Declaration
protected virtual void ProcessChildren(IQueryNode queryTree)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IQueryNode | queryTree | 
See Also
SetQueryConfigHandler(QueryConfigHandler)
Sets the QueryConfigHandler associated to the query tree.
Declaration
public virtual void SetQueryConfigHandler(QueryConfigHandler queryConfigHandler)
  Parameters
| Type | Name | Description | 
|---|---|---|
| QueryConfigHandler | queryConfigHandler | 
See Also
TagModifierButDoNotOverride(IQueryNode, Modifier)
This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children. This is a variant of BooleanModifiersQueryNodeProcessor which ignores precedence.
The StandardSyntaxParser knows the rules of precedence, but lucene does not. e.g.(A AND B OR C AND D) ist treated like
(+A +B +C +D).
This processor walks through the query node tree looking for
BooleanQueryNodes. If an AndQueryNode is found, every child,
which is not a ModifierQueryNode or the ModifierQueryNode is
MOD_NONE, becomes a MOD_REQ. For default
BooleanQueryNode, it checks the default operator is
AND, if it is, the same operation when an
AndQueryNode is found is applied to it. Each BooleanQueryNode
which direct parent is also a BooleanQueryNode is removed (to ignore
the rules of precedence).
Declaration
protected virtual void TagModifierButDoNotOverride(IQueryNode node, Modifier mod)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IQueryNode | node | |
| Modifier | mod |