NamedWriteable
, Writeable
, ToXContent
, ToXContentObject
, QueryBuilder
, Rewriteable<QueryBuilder>
, SpanQueryBuilder
public static class SpanNearQueryBuilder.SpanGapQueryBuilder extends java.lang.Object implements SpanQueryBuilder
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
NAME |
MAX_REWRITE_ROUNDS
EMPTY_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, wait
rewrite
isFragment
public 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.IOException
public java.lang.String fieldName()
public int width()
public org.apache.lucene.search.Query toQuery(QueryShardContext context) throws java.io.IOException
QueryBuilder
Query
.
Returns null if this query should be ignored in the context of
parent queries.toQuery
in interface QueryBuilder
context
- additional information needed to construct the queriesQuery
or null if this query should be ignored upstreamjava.io.IOException
public org.apache.lucene.search.Query toFilter(QueryShardContext context) throws java.io.IOException
QueryBuilder
Query
that acts as a filter.
Returns null if this query should be ignored in the context of
parent queries.toFilter
in interface QueryBuilder
context
- additional information needed to construct the queriesQuery
or null if this query should be ignored upstreamjava.io.IOException
public java.lang.String queryName()
QueryBuilder
queryName
in interface QueryBuilder
public QueryBuilder queryName(java.lang.String queryName)
QueryBuilder
QueryBuilder
so that calls can be chained. This is done
automatically when extending AbstractQueryBuilder
.queryName
in interface QueryBuilder
public float boost()
QueryBuilder
boost
in interface QueryBuilder
public QueryBuilder boost(float boost)
QueryBuilder
QueryBuilder
so that calls can be chained. This is done
automatically when extending AbstractQueryBuilder
.boost
in interface QueryBuilder
public java.lang.String getName()
QueryBuilder
getName
in interface QueryBuilder
public java.lang.String getWriteableName()
NamedWriteable
getWriteableName
in interface NamedWriteable
public final void writeTo(StreamOutput out) throws java.io.IOException
Writeable
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public static SpanNearQueryBuilder.SpanGapQueryBuilder fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public final java.lang.String toString()
toString
in class java.lang.Object
protected static void throwParsingExceptionOnMultipleFields(java.lang.String queryName, XContentLocation contentLocation, java.lang.String processedFieldName, java.lang.String currentFieldName)