org.apache.lucene.queryParser.standard.processors
Class GroupQueryNodeProcessor

java.lang.Object
  extended by org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor

public class GroupQueryNodeProcessor
extends Object
implements QueryNodeProcessor

The SyntaxParser generates query node trees that consider the boolean operator precedence, but Lucene current syntax does not support boolean precedence, so this processor remove all the precedence and apply the equivalent modifier according to the boolean operation defined on an specific query node.

If there is a GroupQueryNode in the query node tree, the query node tree is not merged with the one above it. Example: TODO: describe a good example to show how this processor works

See Also:
StandardQueryConfigHandler

Constructor Summary
GroupQueryNodeProcessor()
           
 
Method Summary
 QueryConfigHandler getQueryConfigHandler()
          Returns the QueryConfigHandler associated to the query tree if any, otherwise it returns null
 QueryNode process(QueryNode queryTree)
          Processes a query node tree.
 void setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
          Sets the QueryConfigHandler associated to the query tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupQueryNodeProcessor

public GroupQueryNodeProcessor()
Method Detail

process

public QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
Description copied from interface: QueryNodeProcessor
Processes a query node tree. It may return the same or another query tree. I should never return null.

Specified by:
process in interface QueryNodeProcessor
Parameters:
queryTree - tree root node
Returns:
the processed query tree
Throws:
QueryNodeException

getQueryConfigHandler

public QueryConfigHandler getQueryConfigHandler()
Description copied from interface: QueryNodeProcessor
Returns the QueryConfigHandler associated to the query tree if any, otherwise it returns null

Specified by:
getQueryConfigHandler in interface QueryNodeProcessor
Returns:
the QueryConfigHandler associated to the query tree if any, otherwise it returns null

setQueryConfigHandler

public void setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
Description copied from interface: QueryNodeProcessor
Sets the QueryConfigHandler associated to the query tree.

Specified by:
setQueryConfigHandler in interface QueryNodeProcessor


Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.