org.apache.lucene.search.spans
Class SpanNearQuery
- Cloneable, Serializable
public class SpanNearQuery
Matches spans which are near one another. One can specify slop, the
maximum number of intervening unmatched positions, as well as whether
matches are required to be in-order.
clone , combine , createWeight , extractTerms , getBoost , getSimilarity , mergeBooleanQueries , rewrite , setBoost , toString , toString , weight |
SpanNearQuery
public SpanNearQuery(SpanQuery[] clauses,
int slop,
boolean inOrder)
Construct a SpanNearQuery. Matches spans matching a span from each
clause, with up to slop
total unmatched positions between
them. * When inOrder
is true, the spans from each clause
must be * ordered as in clauses
.
equals
public boolean equals(Object o)
Returns true iff o
is equal to this.
getClauses
public SpanQuery[] getClauses()
Return the clauses whose spans are matched.
getField
public String getField()
Returns the name of the field matched by this query.
- getField in interface SpanQuery
getSlop
public int getSlop()
Return the maximum number of intervening unmatched positions permitted.
getSpans
public Spans getSpans(IndexReader reader)
throws IOException
Expert: Returns the matches for this query in an index. Used internally
to search for spans.
- getSpans in interface SpanQuery
getTerms
public Collection getTerms()
Returns a collection of all terms matched by this query.
- getTerms in interface SpanQuery
hashCode
public int hashCode()
isInOrder
public boolean isInOrder()
Return true if matches are required to be in-order.
toString
public String toString(String field)
- toString in interface Query
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.