NamedWriteable, Writeable, ToXContent, ToXContentObject, QueryBuilder, Rewriteable<QueryBuilder>, SpanQueryBuilderpublic static class SpanNearQueryBuilder.SpanGapQueryBuilder extends java.lang.Object implements SpanQueryBuilder
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
NAME |
MAX_REWRITE_ROUNDSEMPTY_PARAMS| Constructor | Description |
|---|---|
SpanGapQueryBuilder(java.lang.String fieldName,
int width) |
Constructs a new SpanGapQueryBuilder term query.
|
SpanGapQueryBuilder(StreamInput in) |
Read from a stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
float |
boost() |
Returns the boost for this query.
|
QueryBuilder |
boost(float boost) |
Sets the boost for this query.
|
boolean |
equals(java.lang.Object obj) |
|
java.lang.String |
fieldName() |
|
static SpanNearQueryBuilder.SpanGapQueryBuilder |
fromXContent(XContentParser parser) |
|
java.lang.String |
getName() |
Returns the name that identifies uniquely the query
|
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
int |
hashCode() |
|
java.lang.String |
queryName() |
Returns the arbitrary name assigned to the query (see named queries).
|
QueryBuilder |
queryName(java.lang.String queryName) |
Sets the arbitrary name to be assigned to the query (see named queries).
|
protected static void |
throwParsingExceptionOnMultipleFields(java.lang.String queryName,
XContentLocation contentLocation,
java.lang.String processedFieldName,
java.lang.String currentFieldName) |
|
org.apache.lucene.search.Query |
toFilter(QueryShardContext context) |
Converts this QueryBuilder to an unscored lucene
Query that acts as a filter. |
org.apache.lucene.search.Query |
toQuery(QueryShardContext context) |
Converts this QueryBuilder to a lucene
Query. |
java.lang.String |
toString() |
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
int |
width() |
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitrewriteisFragmentpublic static final java.lang.String NAME
public SpanGapQueryBuilder(java.lang.String fieldName,
int width)
fieldName - The name of the fieldwidth - The width of the gap introducedpublic SpanGapQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String fieldName()
public int width()
public org.apache.lucene.search.Query toQuery(QueryShardContext context) throws java.io.IOException
QueryBuilderQuery.
Returns null if this query should be ignored in the context of
parent queries.toQuery in interface QueryBuildercontext - additional information needed to construct the queriesQuery or null if this query should be ignored upstreamjava.io.IOExceptionpublic org.apache.lucene.search.Query toFilter(QueryShardContext context) throws java.io.IOException
QueryBuilderQuery that acts as a filter.
Returns null if this query should be ignored in the context of
parent queries.toFilter in interface QueryBuildercontext - additional information needed to construct the queriesQuery or null if this query should be ignored upstreamjava.io.IOExceptionpublic java.lang.String queryName()
QueryBuilderqueryName in interface QueryBuilderpublic QueryBuilder queryName(java.lang.String queryName)
QueryBuilderQueryBuilder so that calls can be chained. This is done
automatically when extending AbstractQueryBuilder.queryName in interface QueryBuilderpublic float boost()
QueryBuilderboost in interface QueryBuilderpublic QueryBuilder boost(float boost)
QueryBuilderQueryBuilder so that calls can be chained. This is done
automatically when extending AbstractQueryBuilder.boost in interface QueryBuilderpublic java.lang.String getName()
QueryBuildergetName in interface QueryBuilderpublic java.lang.String getWriteableName()
NamedWriteablegetWriteableName in interface NamedWriteablepublic final void writeTo(StreamOutput out) throws java.io.IOException
Writeablepublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionpublic static SpanNearQueryBuilder.SpanGapQueryBuilder fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOExceptionpublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic final java.lang.String toString()
toString in class java.lang.Objectprotected static void throwParsingExceptionOnMultipleFields(java.lang.String queryName,
XContentLocation contentLocation,
java.lang.String processedFieldName,
java.lang.String currentFieldName)