org.apache.lucene.search.spans
Class SpanNearQuery
- Cloneable, java.io.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.
- Serialized Form
clone , combine , createWeight , 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
.
getClauses
public SpanQuery[] getClauses()
Return the clauses whose spans are matched.
getField
public String getField()
- getField in interface SpanQuery
getSlop
public int getSlop()
Return the maximum number of intervening unmatched positions permitted.
getTerms
public Collection getTerms()
- getTerms in interface SpanQuery
isInOrder
public boolean isInOrder()
Return true if matches are required to be in-order.
toString
public String toString(String field)
Prints a query to a string, with
field
as the default field
for terms.
The representation used is one that is readable by
QueryParser
(although, if the query was created by the parser, the printed
representation may not be exactly what was parsed).
- toString in interface Query
Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.