public class SpanNotQueryBuilder extends AbstractQueryBuilder<SpanNotQueryBuilder> implements SpanQueryBuilder
Writeable.Reader<V>, Writeable.Writer<V>ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_POST
the default post parameter size
|
static int |
DEFAULT_PRE
the default pre parameter size
|
static java.lang.String |
NAME |
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryNameEMPTY_PARAMSMAX_REWRITE_ROUNDS| Constructor and Description |
|---|
SpanNotQueryBuilder(SpanQueryBuilder include,
SpanQueryBuilder exclude)
Construct a span query matching spans from
include which
have no overlap with spans from exclude. |
SpanNotQueryBuilder(StreamInput in)
Read from a stream.
|
| Modifier and Type | Method and Description |
|---|---|
SpanNotQueryBuilder |
dist(int dist) |
protected boolean |
doEquals(SpanNotQueryBuilder 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) |
SpanQueryBuilder |
excludeQuery() |
static SpanNotQueryBuilder |
fromXContent(XContentParser parser) |
java.lang.String |
getWriteableName()
Returns the name of the writeable object
|
SpanQueryBuilder |
includeQuery() |
java.lang.Integer |
post() |
SpanNotQueryBuilder |
post(int post) |
java.lang.Integer |
pre() |
SpanNotQueryBuilder |
pre(int pre) |
addValidationError, boost, boost, convertToBytesRefIfString, convertToStringIfBytesRef, declareStandardFields, doRewrite, equals, extractInnerHitBuilders, getName, hashCode, parseInnerQueryBuilder, 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, toFilter, toQueryisFragmenttoXContentrewrite, rewrite, rewrite, rewriteAndFetch, rewriteAndFetchpublic static final java.lang.String NAME
public static final int DEFAULT_PRE
public static final int DEFAULT_POST
public SpanNotQueryBuilder(SpanQueryBuilder include, SpanQueryBuilder exclude)
include which
have no overlap with spans from exclude.include - the span query whose matches are filteredexclude - the span query whose matches must not overlappublic SpanNotQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOExceptionprotected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo in class AbstractQueryBuilder<SpanNotQueryBuilder>java.io.IOExceptionpublic SpanQueryBuilder includeQuery()
public SpanQueryBuilder excludeQuery()
public SpanNotQueryBuilder dist(int dist)
dist - the amount of tokens from within the include span can’t have overlap with the exclude span.
Equivalent to setting both pre and post parameter.public SpanNotQueryBuilder pre(int pre)
pre - the amount of tokens before the include span that can’t have overlap with the exclude span. Values
smaller than 0 will be ignored and 0 used instead.public java.lang.Integer pre()
pre(int)public SpanNotQueryBuilder post(int post)
post - the amount of tokens after the include span that can’t have overlap with the exclude span.public java.lang.Integer post()
post(int)protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent in class AbstractQueryBuilder<SpanNotQueryBuilder>java.io.IOExceptionpublic static SpanNotQueryBuilder 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<SpanNotQueryBuilder>java.io.IOExceptionprotected int doHashCode()
doHashCode in class AbstractQueryBuilder<SpanNotQueryBuilder>protected boolean doEquals(SpanNotQueryBuilder other)
AbstractQueryBuilderQueryBuilder object of the same type is "equal to" this one.doEquals in class AbstractQueryBuilder<SpanNotQueryBuilder>public java.lang.String getWriteableName()
NamedWriteablegetWriteableName in interface NamedWriteable