public class DisMaxQueryBuilder extends AbstractQueryBuilder<DisMaxQueryBuilder>
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_TIE_BREAKER
Default multiplication factor for breaking ties in document scores.
|
static java.lang.String |
NAME |
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryName
EMPTY_PARAMS
Constructor and Description |
---|
DisMaxQueryBuilder() |
DisMaxQueryBuilder(StreamInput in)
Read from a stream.
|
Modifier and Type | Method and Description |
---|---|
DisMaxQueryBuilder |
add(QueryBuilder queryBuilder)
Add a sub-query to this disjunction.
|
protected boolean |
doEquals(DisMaxQueryBuilder 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) |
protected void |
extractInnerHitBuilders(java.util.Map<java.lang.String,InnerHitContextBuilder> innerHits)
For internal usage only!
Extracts the inner hits from the query tree.
|
static java.util.Optional<DisMaxQueryBuilder> |
fromXContent(QueryParseContext parseContext) |
java.lang.String |
getWriteableName()
Returns the name of the writeable object
|
java.util.List<QueryBuilder> |
innerQueries() |
float |
tieBreaker() |
DisMaxQueryBuilder |
tieBreaker(float tieBreaker)
The score of each non-maximum disjunct for a document is multiplied by this weight
and added into the final score.
|
addValidationError, boost, boost, convertToBytesRefIfString, convertToStringIfBytesRef, declareStandardFields, doRewrite, equals, 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
rewriteQuery
isFragment
public static final java.lang.String NAME
public static final float DEFAULT_TIE_BREAKER
public DisMaxQueryBuilder()
public DisMaxQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractQueryBuilder<DisMaxQueryBuilder>
java.io.IOException
public DisMaxQueryBuilder add(QueryBuilder queryBuilder)
public java.util.List<QueryBuilder> innerQueries()
public DisMaxQueryBuilder tieBreaker(float tieBreaker)
public float tieBreaker()
tieBreaker(float)
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent
in class AbstractQueryBuilder<DisMaxQueryBuilder>
java.io.IOException
public static java.util.Optional<DisMaxQueryBuilder> 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<DisMaxQueryBuilder>
java.io.IOException
protected int doHashCode()
doHashCode
in class AbstractQueryBuilder<DisMaxQueryBuilder>
protected boolean doEquals(DisMaxQueryBuilder other)
AbstractQueryBuilder
QueryBuilder
object of the same type is "equal to" this one.doEquals
in class AbstractQueryBuilder<DisMaxQueryBuilder>
public java.lang.String getWriteableName()
NamedWriteable
protected void extractInnerHitBuilders(java.util.Map<java.lang.String,InnerHitContextBuilder> innerHits)
AbstractQueryBuilder
extractInnerHitBuilders
in class AbstractQueryBuilder<DisMaxQueryBuilder>