Class ModifierQueryNode
A ModifierQueryNode indicates the modifier value (+,-,?,NONE) for each term on the query string. For example "+t1 -t2 t3" will have a tree of:
<BooleanQueryNode> <ModifierQueryNode modifier="MOD_REQ"> <t1/> </ModifierQueryNode> <ModifierQueryNode modifier="MOD_NOT"> <t2/> </ModifierQueryNode> <t3/> </BooleanQueryNode>
Implements
Inherited Members
Namespace: Lucene.Net.QueryParsers.Flexible.Core.Nodes
Assembly: Lucene.Net.QueryParser.dll
Syntax
public class ModifierQueryNode : QueryNode, IQueryNode
Constructors
ModifierQueryNode(IQueryNode, Modifier)
Used to store the modifier value on the original query string
Declaration
public ModifierQueryNode(IQueryNode query, Modifier mod)
Parameters
Type | Name | Description |
---|---|---|
IQueryNode | query | QueryNode subtree |
Modifier | mod | Modifier Value |
Properties
Modifier
A ModifierQueryNode indicates the modifier value (+,-,?,NONE) for each term on the query string. For example "+t1 -t2 t3" will have a tree of:
<BooleanQueryNode> <ModifierQueryNode modifier="MOD_REQ"> <t1/> </ModifierQueryNode> <ModifierQueryNode modifier="MOD_NOT"> <t2/> </ModifierQueryNode> <t3/> </BooleanQueryNode>
Declaration
public virtual Modifier Modifier { get; }
Property Value
Type | Description |
---|---|
Modifier |
Methods
CloneTree()
Recursive clone the IQueryNode tree. The tags are not copied to the new tree when you call the CloneTree() method.
Declaration
public override IQueryNode CloneTree()
Returns
Type | Description |
---|---|
IQueryNode | the cloned tree |
Overrides
GetChild()
A ModifierQueryNode indicates the modifier value (+,-,?,NONE) for each term on the query string. For example "+t1 -t2 t3" will have a tree of:
<BooleanQueryNode> <ModifierQueryNode modifier="MOD_REQ"> <t1/> </ModifierQueryNode> <ModifierQueryNode modifier="MOD_NOT"> <t2/> </ModifierQueryNode> <t3/> </BooleanQueryNode>
Declaration
public virtual IQueryNode GetChild()
Returns
Type | Description |
---|---|
IQueryNode |
SetChild(IQueryNode)
A ModifierQueryNode indicates the modifier value (+,-,?,NONE) for each term on the query string. For example "+t1 -t2 t3" will have a tree of:
<BooleanQueryNode> <ModifierQueryNode modifier="MOD_REQ"> <t1/> </ModifierQueryNode> <ModifierQueryNode modifier="MOD_NOT"> <t2/> </ModifierQueryNode> <t3/> </BooleanQueryNode>
Declaration
public virtual void SetChild(IQueryNode child)
Parameters
Type | Name | Description |
---|---|---|
IQueryNode | child |
ToQueryString(IEscapeQuerySyntax)
convert to a query string understood by the query parser
Declaration
public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
Parameters
Type | Name | Description |
---|---|---|
IEscapeQuerySyntax | escapeSyntaxParser |
Returns
Type | Description |
---|---|
string |
Overrides
ToString()
Every implementation of this class should return pseudo xml like this:
For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |