Save This Page
Home » lucene-3.0.1-src » org.apache.lucene.queryParser.core.nodes » [javadoc | source]
org.apache.lucene.queryParser.core.nodes
public class: ProximityQueryNode [javadoc | source]
java.lang.Object
   org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
      org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
         org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

All Implemented Interfaces:
    Cloneable, QueryNode

A ProximityQueryNode represents a query where the terms should meet specific distance conditions. (a b c) WITHIN [SENTENCE|PARAGRAPH|NUMBER] [INORDER] ("a" "b" "c") WITHIN [SENTENCE|PARAGRAPH|NUMBER] [INORDER] TODO: Add this to the future standard Lucene parser/processor/builder
Nested Class Summary:
public enum class  ProximityQueryNode.Type   
public static class  ProximityQueryNode.ProximityType   
Fields inherited from org.apache.lucene.queryParser.core.nodes.QueryNodeImpl:
PLAINTEXT_FIELD_NAME,  toQueryStringIgnoreFields
Constructor:
 public ProximityQueryNode(List<QueryNode> clauses,
    CharSequence field,
    Type type,
    boolean inorder) 
    Parameters:
    clauses - - QueryNode children
    field - - field name
    type - - type of proximity query
    inorder - - true, if the tokens should be matched in the order of the clauses
 public ProximityQueryNode(List<QueryNode> clauses,
    CharSequence field,
    Type type,
    int distance,
    boolean inorder) 
    Parameters:
    clauses - - QueryNode children
    field - - field name
    type - - type of proximity query
    distance - - positive integer that specifies the distance
    inorder - - true, if the tokens should be matched in the order of the clauses
Method from org.apache.lucene.queryParser.core.nodes.ProximityQueryNode Summary:
cloneTree,   getDistance,   getField,   getFieldAsString,   getProximityType,   isInOrder,   setField,   toQueryString,   toString
Methods from org.apache.lucene.queryParser.core.nodes.BooleanQueryNode:
cloneTree,   toQueryString,   toString
Methods from org.apache.lucene.queryParser.core.nodes.QueryNodeImpl:
add,   add,   allocate,   clone,   cloneTree,   containsTag,   getChildren,   getParent,   getTag,   getTags,   isDefaultField,   isLeaf,   isRoot,   set,   setLeaf,   setTag,   toString,   unsetTag
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.queryParser.core.nodes.ProximityQueryNode Detail:
 public QueryNode cloneTree() throws CloneNotSupportedException 
 public int getDistance() 
 public CharSequence getField() 
    returns null if the field was not specified in the query string
 public String getFieldAsString() 
    returns null if the field was not specified in the query string
 public Type getProximityType() 
 public boolean isInOrder() 
 public  void setField(CharSequence field) 
 public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser) 
 public String toString()