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: SlopQueryNode [javadoc | source]
java.lang.Object
   org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
      org.apache.lucene.queryParser.core.nodes.SlopQueryNode

All Implemented Interfaces:
    FieldableNode, Cloneable, QueryNode

A SlopQueryNode represents phrase query with a slop. From Lucene FAQ: Is there a way to use a proximity operator (like near or within) with Lucene? There is a variable called slop that allows you to perform NEAR/WITHIN-like queries. By default, slop is set to 0 so that only exact phrases will match. When using TextParser you can use this syntax to specify the slop: "doug cutting"~2 will find documents that contain "doug cutting" as well as ones that contain "cutting doug".
Fields inherited from org.apache.lucene.queryParser.core.nodes.QueryNodeImpl:
PLAINTEXT_FIELD_NAME,  toQueryStringIgnoreFields
Constructor:
 public SlopQueryNode(QueryNode query,
    int value) 
    Parameters:
    query - - QueryNode Tree with the phrase
    value - - slop value
Method from org.apache.lucene.queryParser.core.nodes.SlopQueryNode Summary:
cloneTree,   getChild,   getField,   getValue,   setField,   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.SlopQueryNode Detail:
 public QueryNode cloneTree() throws CloneNotSupportedException 
 public QueryNode getChild() 
 public CharSequence getField() 
 public int getValue() 
 public  void setField(CharSequence fieldName) 
 public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser) 
 public String toString()