public class SpanNearQueryBuilder extends AbstractQueryBuilder<SpanNearQueryBuilder> implements SpanQueryBuilder
SpanNearQuery.Writeable.Reader<V>, Writeable.Writer<V>ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_IN_ORDER
Default for flag controlling whether matches are required to be in-order
|
static java.lang.String |
NAME |
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryNameEMPTY_PARAMS| Constructor and Description |
|---|
SpanNearQueryBuilder(SpanQueryBuilder initialClause,
int slop) |
SpanNearQueryBuilder(StreamInput in)
Read from a stream.
|
| Modifier and Type | Method and 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 java.util.Optional<SpanNearQueryBuilder> |
fromXContent(QueryParseContext parseContext) |
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, convertToBytesRefIfString, convertToStringIfBytesRef, declareStandardFields, doRewrite, equals, extractInnerHitBuilders, getName, hashCode, printBoostAndQueryName, queryName, queryName, readQueries, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toFilter, toQueries, toQuery, toXContent, writeQueries, writeTobuildAsBytes, buildAsBytes, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitboost, boost, getName, queryName, queryName, rewrite, rewriteQuery, toFilter, toQueryisFragment, toXContentpublic static final java.lang.String NAME
public static boolean DEFAULT_IN_ORDER
public 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 java.util.Optional<SpanNearQueryBuilder> fromXContent(QueryParseContext parseContext) 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