NamedWriteable, Writeable, ToXContent, ToXContentObject, QueryBuilder, Rewriteable<QueryBuilder>, SpanQueryBuilderpublic class SpanNearQueryBuilder extends AbstractQueryBuilder<SpanNearQueryBuilder> implements SpanQueryBuilder
SpanNearQuery.ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.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, queryNameMAX_REWRITE_ROUNDSEMPTY_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, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitboost, boost, getName, queryName, queryName, rewrite, toFilter, toQueryrewrite, rewrite, rewrite, rewriteAndFetch, rewriteAndFetchtoXContentisFragmentpublic 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.IOExceptionprotected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo in class AbstractQueryBuilder<SpanNearQueryBuilder>java.io.IOExceptionpublic 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 truepublic boolean inOrder()
inOrder(boolean)protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent in class AbstractQueryBuilder<SpanNearQueryBuilder>java.io.IOExceptionpublic static SpanNearQueryBuilder fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOExceptionprotected org.apache.lucene.search.Query doToQuery(QueryShardContext context) throws java.io.IOException
doToQuery in class AbstractQueryBuilder<SpanNearQueryBuilder>java.io.IOExceptionprotected int doHashCode()
doHashCode in class AbstractQueryBuilder<SpanNearQueryBuilder>protected boolean doEquals(SpanNearQueryBuilder other)
AbstractQueryBuilderQueryBuilder object of the same type is "equal to" this one.doEquals in class AbstractQueryBuilder<SpanNearQueryBuilder>public java.lang.String getWriteableName()
NamedWriteablegetWriteableName in interface NamedWriteable