Package org.apache.lucene.queries.spans
Class SpanNearQuery.Builder
- java.lang.Object
-
- org.apache.lucene.queries.spans.SpanNearQuery.Builder
-
- Enclosing class:
- SpanNearQuery
public static class SpanNearQuery.Builder extends Object
A builder for SpanNearQueries
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpanNearQuery.Builder
addClause(SpanQuery clause)
Add a new clauseSpanNearQuery.Builder
addGap(int width)
Add a gap after the previous clause of a defined widthSpanNearQuery
build()
Build the querySpanNearQuery.Builder
setSlop(int slop)
Set the slop for this query
-
-
-
Constructor Detail
-
Builder
public Builder(String field, boolean ordered)
Construct a new builder- Parameters:
field
- the field to search inordered
- whether or not clauses must be in-order to match
-
-
Method Detail
-
addClause
public SpanNearQuery.Builder addClause(SpanQuery clause)
Add a new clause
-
addGap
public SpanNearQuery.Builder addGap(int width)
Add a gap after the previous clause of a defined width
-
setSlop
public SpanNearQuery.Builder setSlop(int slop)
Set the slop for this query
-
build
public SpanNearQuery build()
Build the query
-
-