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, queryName
EMPTY_PARAMS
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 java.util.Optional<SpanNotQueryBuilder> |
fromXContent(QueryParseContext parseContext) |
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, printBoostAndQueryName, queryName, queryName, readQueries, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toFilter, toQueries, toQuery, toXContent, writeQueries, writeTo
buildAsBytes, buildAsBytes, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
boost, boost, getName, queryName, queryName, rewrite, rewriteQuery, toFilter, toQuery
toXContent
public 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.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractQueryBuilder<SpanNotQueryBuilder>
java.io.IOException
public 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.IOException
public static java.util.Optional<SpanNotQueryBuilder> fromXContent(QueryParseContext parseContext) throws java.io.IOException
java.io.IOException
protected org.apache.lucene.search.Query doToQuery(QueryShardContext context) throws java.io.IOException
doToQuery
in class AbstractQueryBuilder<SpanNotQueryBuilder>
java.io.IOException
protected int doHashCode()
doHashCode
in class AbstractQueryBuilder<SpanNotQueryBuilder>
protected boolean doEquals(SpanNotQueryBuilder other)
AbstractQueryBuilder
QueryBuilder
object of the same type is "equal to" this one.doEquals
in class AbstractQueryBuilder<SpanNotQueryBuilder>
public java.lang.String getWriteableName()
NamedWriteable
getWriteableName
in interface NamedWriteable