Save This Page
Home » lucene-3.0.1-src » org.apache » lucene » search » spans » [javadoc | source]
org.apache.lucene.search.spans
public class: NearSpansOrdered [javadoc | source]
java.lang.Object
   org.apache.lucene.search.spans.Spans
      org.apache.lucene.search.spans.NearSpansOrdered
A Spans that is formed from the ordered subspans of a SpanNearQuery where the subspans do not overlap and have a maximum slop between them.

The formed spans only contains minimum slop matches.
The matching slop is computed from the distance(s) between the non overlapping matching Spans.
Successive matches are always formed from the successive Spans of the SpanNearQuery.

The formed spans may contain overlaps when the slop is at least 1. For example, when querying using

t1 t2 t3
with slop at least 1, the fragment:
t1 t2 t1 t3 t2 t3
matches twice:
t1 t2 .. t3      
      t1 .. t2 t3
Expert: Only public for subclassing. Most implementations should not need this class
Constructor:
 public NearSpansOrdered(SpanNearQuery spanNearQuery,
    IndexReader reader) throws IOException 
 public NearSpansOrdered(SpanNearQuery spanNearQuery,
    IndexReader reader,
    boolean collectPayloads) throws IOException 
Method from org.apache.lucene.search.spans.NearSpansOrdered Summary:
doc,   docSpansOrdered,   end,   getPayload,   getSubSpans,   isPayloadAvailable,   next,   skipTo,   start,   toString
Methods from org.apache.lucene.search.spans.Spans:
doc,   end,   getPayload,   isPayloadAvailable,   next,   skipTo,   start
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.search.spans.NearSpansOrdered Detail:
 public int doc() 
 static final boolean docSpansOrdered(Spans spans1,
    Spans spans2) 
    Check whether two Spans in the same document are ordered.
 public int end() 
 public Collection<byte> getPayload() throws IOException 
 public Spans[] getSubSpans() 
 public boolean isPayloadAvailable() 
 public boolean next() throws IOException 
 public boolean skipTo(int target) throws IOException 
 public int start() 
 public String toString()