Module org.elasticsearch.server
Package org.elasticsearch.index.query
Class InterceptedQueryBuilderWrapper
java.lang.Object
org.elasticsearch.index.query.InterceptedQueryBuilderWrapper
- All Implemented Interfaces:
NamedWriteable,VersionedNamedWriteable,Writeable,QueryBuilder,Rewriteable<QueryBuilder>,ToXContent,ToXContentObject
Wrapper for instances of
QueryBuilder that have been intercepted using the QueryRewriteInterceptor to
break out of the rewrite phase. These instances are unwrapped on serialization.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDSFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatboost()Returns the boost for this query.boost(float boost) Sets the boost for this query.booleanThe minimal version of the recipient this object can be sent to.getName()Returns the name that identifies uniquely the queryReturns the name of the writeable objectinthashCode()query()Returns the arbitrary name assigned to the query (see named queries).Sets the arbitrary name to be assigned to the query (see named queries).rewrite(QueryRewriteContext queryRewriteContext) Rewrites this query builder into its primitive form.org.apache.lucene.search.QuerytoQuery(SearchExecutionContext context) Converts this QueryBuilder to a luceneQuery.toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragmentMethods inherited from interface org.elasticsearch.common.io.stream.VersionedNamedWriteable
supportsVersion
-
Field Details
-
queryBuilder
-
-
Constructor Details
-
InterceptedQueryBuilderWrapper
-
-
Method Details
-
query
-
rewrite
Description copied from interface:QueryBuilderRewrites this query builder into its primitive form. By default this method return the builder itself. If the builder did not change the identity reference must be returned otherwise the builder will be rewritten infinitely.- Specified by:
rewritein interfaceQueryBuilder- Specified by:
rewritein interfaceRewriteable<QueryBuilder>- Throws:
IOException
-
getWriteableName
Description copied from interface:VersionedNamedWriteableReturns the name of the writeable object- Specified by:
getWriteableNamein interfaceNamedWriteable- Specified by:
getWriteableNamein interfaceVersionedNamedWriteable
-
getMinimalSupportedVersion
Description copied from interface:VersionedNamedWriteableThe minimal version of the recipient this object can be sent to. SeeVersionedNamedWriteable.supportsVersion(TransportVersion)for the default serialization check.- Specified by:
getMinimalSupportedVersionin interfaceVersionedNamedWriteable
-
toQuery
Description copied from interface:QueryBuilderConverts this QueryBuilder to a luceneQuery. Returnsnullif this query should be ignored in the context of parent queries.- Specified by:
toQueryin interfaceQueryBuilder- Parameters:
context- additional information needed to construct the queries- Returns:
- the
Queryornullif this query should be ignored upstream - Throws:
IOException
-
queryName
Description copied from interface:QueryBuilderSets the arbitrary name to be assigned to the query (see named queries). Implementers should return the concrete type of theQueryBuilderso that calls can be chained. This is done automatically when extendingAbstractQueryBuilder.- Specified by:
queryNamein interfaceQueryBuilder
-
queryName
Description copied from interface:QueryBuilderReturns the arbitrary name assigned to the query (see named queries).- Specified by:
queryNamein interfaceQueryBuilder
-
boost
public float boost()Description copied from interface:QueryBuilderReturns the boost for this query.- Specified by:
boostin interfaceQueryBuilder
-
boost
Description copied from interface:QueryBuilderSets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided. Implementers should return the concrete type of theQueryBuilderso that calls can be chained. This is done automatically when extendingAbstractQueryBuilder.- Specified by:
boostin interfaceQueryBuilder
-
getName
Description copied from interface:QueryBuilderReturns the name that identifies uniquely the query- Specified by:
getNamein interfaceQueryBuilder
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-