NamedWriteable
, Writeable
, ToXContent
, ToXContentObject
, QueryBuilder
, Rewriteable<QueryBuilder>
, SpanQueryBuilder
public class SpanNearQueryBuilder extends AbstractQueryBuilder<SpanNearQueryBuilder> implements SpanQueryBuilder
SpanNearQuery
.ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static boolean |
DEFAULT_IN_ORDER |
Default for flag controlling whether matches are required to be in-order
|
static int |
DEFAULT_SLOP |
Default slop value, this is the same that lucene
SpanNearQuery uses if no slop is provided |
static java.lang.String |
NAME |
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryName
MAX_REWRITE_ROUNDS
EMPTY_PARAMS
Constructor | Description |
---|---|
SpanNearQueryBuilder(StreamInput in) |
Read from a stream.
|
SpanNearQueryBuilder(SpanQueryBuilder initialClause,
int slop) |
Modifier and Type | Method | Description |
---|---|---|
SpanNearQueryBuilder |
addClause(SpanQueryBuilder clause) |
Add a span clause to the current list of clauses
|
java.util.List<SpanQueryBuilder> |
clauses() |
|
protected boolean |
doEquals(SpanNearQueryBuilder other) |
Indicates whether some other
QueryBuilder object of the same type is "equal to" this one. |
protected int |
doHashCode() |
|
protected org.apache.lucene.search.Query |
doToQuery(QueryShardContext context) |
|
protected void |
doWriteTo(StreamOutput out) |
|
protected void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
|
static SpanNearQueryBuilder |
fromXContent(XContentParser parser) |
|
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
boolean |
inOrder() |
|
SpanNearQueryBuilder |
inOrder(boolean inOrder) |
When
inOrder is true, the spans from each clause
must be in the same order as in clauses and must be non-overlapping. |
int |
slop() |
addValidationError, boost, boost, declareStandardFields, doRewrite, equals, extractInnerHitBuilders, getName, hashCode, parseInnerQueryBuilder, printBoostAndQueryName, queryName, queryName, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toFilter, toQuery, toString, toXContent, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
boost, boost, getName, queryName, queryName, rewrite, toFilter, toQuery
rewrite, rewrite, rewrite, rewriteAndFetch, rewriteAndFetch
toXContent
isFragment
public static final java.lang.String NAME
public static boolean DEFAULT_IN_ORDER
public static int DEFAULT_SLOP
SpanNearQuery
uses if no slop is providedpublic SpanNearQueryBuilder(SpanQueryBuilder initialClause, int slop)
initialClause
- an initial span query clauseslop
- controls the maximum number of intervening unmatched positions permittedpublic SpanNearQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractQueryBuilder<SpanNearQueryBuilder>
java.io.IOException
public int slop()
public SpanNearQueryBuilder addClause(SpanQueryBuilder clause)
public java.util.List<SpanQueryBuilder> clauses()
SpanQueryBuilder
clauses that were set for this querypublic SpanNearQueryBuilder inOrder(boolean inOrder)
inOrder
is true, the spans from each clause
must be in the same order as in clauses
and must be non-overlapping.
Defaults to true
public boolean inOrder()
inOrder(boolean)
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent
in class AbstractQueryBuilder<SpanNearQueryBuilder>
java.io.IOException
public static SpanNearQueryBuilder fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException
protected org.apache.lucene.search.Query doToQuery(QueryShardContext context) throws java.io.IOException
doToQuery
in class AbstractQueryBuilder<SpanNearQueryBuilder>
java.io.IOException
protected int doHashCode()
doHashCode
in class AbstractQueryBuilder<SpanNearQueryBuilder>
protected boolean doEquals(SpanNearQueryBuilder other)
AbstractQueryBuilder
QueryBuilder
object of the same type is "equal to" this one.doEquals
in class AbstractQueryBuilder<SpanNearQueryBuilder>
public java.lang.String getWriteableName()
NamedWriteable
getWriteableName
in interface NamedWriteable