Interface IQueryNode
A IQueryNode is a interface implemented by all nodes on a IQueryNode tree.
Namespace: Lucene.Net.QueryParsers.Flexible.Core.Nodes
Assembly: Lucene.Net.QueryParser.dll
Syntax
public interface IQueryNode
Properties
IsLeaf
verify if a node is a Leaf node
Declaration
bool IsLeaf { get; }
Property Value
Type | Description |
---|---|
bool |
Parent
A IQueryNode is a interface implemented by all nodes on a IQueryNode tree.
Declaration
IQueryNode Parent { get; }
Property Value
Type | Description |
---|---|
IQueryNode |
TagMap
Gets a map containing all tags attached to this query node.
Declaration
IDictionary<string, object> TagMap { get; }
Property Value
Type | Description |
---|---|
IDictionary<string, object> |
Methods
Add(IQueryNode)
add a new child to a non Leaf node
Declaration
void Add(IQueryNode child)
Parameters
Type | Name | Description |
---|---|---|
IQueryNode | child |
Add(IList<IQueryNode>)
A IQueryNode is a interface implemented by all nodes on a IQueryNode tree.
Declaration
void Add(IList<IQueryNode> children)
Parameters
Type | Name | Description |
---|---|---|
IList<IQueryNode> | children |
CloneTree()
Recursive clone the IQueryNode tree. The tags are not copied to the new tree when you call the CloneTree() method.
Declaration
IQueryNode CloneTree()
Returns
Type | Description |
---|---|
IQueryNode | the cloned tree |
ContainsTag(string)
verify if a node contains a tag
Declaration
bool ContainsTag(string tagName)
Parameters
Type | Name | Description |
---|---|---|
string | tagName |
Returns
Type | Description |
---|---|
bool |
GetChildren()
get Children nodes
Declaration
IList<IQueryNode> GetChildren()
Returns
Type | Description |
---|---|
IList<IQueryNode> |
GetTag(string)
Returns object stored under that tag name
Declaration
object GetTag(string tagName)
Parameters
Type | Name | Description |
---|---|---|
string | tagName |
Returns
Type | Description |
---|---|
object |
RemoveChildren(IQueryNode)
Remove a child node.
Declaration
void RemoveChildren(IQueryNode childNode)
Parameters
Type | Name | Description |
---|---|---|
IQueryNode | childNode | Which child to remove. |
RemoveFromParent()
Removes this query node from its parent.
Declaration
void RemoveFromParent()
Set(IList<IQueryNode>)
reset the children of a node
Declaration
void Set(IList<IQueryNode> children)
Parameters
Type | Name | Description |
---|---|---|
IList<IQueryNode> | children |
SetTag(string, object)
Associate the specified value with the specified tagName
. If the tagName
already exists, the old value is replaced. The tagName
and value
cannot be
null. tagName
will be converted to lowercase.
Declaration
void SetTag(string tagName, object value)
Parameters
Type | Name | Description |
---|---|---|
string | tagName | |
object | value |
ToQueryString(IEscapeQuerySyntax)
convert to a query string understood by the query parser
Declaration
string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
Parameters
Type | Name | Description |
---|---|---|
IEscapeQuerySyntax | escapeSyntaxParser |
Returns
Type | Description |
---|---|
string |
ToString()
for printing
Declaration
string ToString()
Returns
Type | Description |
---|---|
string |
TryGetTag(string, out object)
Gets the tag associated with the specified tagName.
Declaration
bool TryGetTag(string tagName, out object tag)
Parameters
Type | Name | Description |
---|---|---|
string | tagName | |
object | tag |
Returns
Type | Description |
---|---|
bool |
UnsetTag(string)
Unset a tag. tagName
will be converted to lowercase.
Declaration
void UnsetTag(string tagName)
Parameters
Type | Name | Description |
---|---|---|
string | tagName |