Class ExpressionQueryBuilder
java.lang.Object
org.elasticsearch.index.query.AbstractQueryBuilder<ExpressionQueryBuilder>
org.elasticsearch.xpack.esql.io.stream.ExpressionQueryBuilder
- All Implemented Interfaces:
NamedWriteable,VersionedNamedWriteable,Writeable,MultiTermQueryBuilder,QueryBuilder,Rewriteable<QueryBuilder>,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public class ExpressionQueryBuilder
extends AbstractQueryBuilder<ExpressionQueryBuilder>
implements MultiTermQueryBuilder
Implements an Expression query builder, which matches documents based on a given expression.
The expression itself must provide the
TranslationAware.asLuceneQuery(org.elasticsearch.index.mapper.MappedFieldType, org.apache.lucene.search.MultiTermQuery.RewriteMethod, org.elasticsearch.index.query.SearchExecutionContext) interface to be translated into a Lucene query.
It allows for serialization of the expression and generate an AutomatonQuery on the data node
as Automaton does not support serialization.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.index.query.AbstractQueryBuilder
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryNameFields 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 TypeMethodDescriptionprotected booleandoEquals(ExpressionQueryBuilder other) protected intprotected org.apache.lucene.search.QuerydoToQuery(SearchExecutionContext context) protected voiddoWriteTo(StreamOutput out) protected voiddoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) Methods inherited from class org.elasticsearch.index.query.AbstractQueryBuilder
addValidationError, boost, boost, boostAndQueryNameToXContent, checkNegativeBoost, declareStandardFields, doCoordinatorRewrite, doIndexMetadataRewrite, doInnerHitsRewrite, doRewrite, doSearchRewrite, equals, extractInnerHitBuilders, getMaxNestedDepth, getName, hashCode, parseInnerQueryBuilder, parseTopLevelQuery, parseTopLevelQuery, printBoostAndQueryName, queryName, queryName, readQueries, requireValue, rewrite, setMaxNestedDepth, throwParsingExceptionOnMultipleFields, toQuery, toString, toXContent, writeQueries, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.index.query.QueryBuilder
boost, boost, getName, queryName, queryName, rewrite, toQueryMethods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
ENTRY
-
-
Constructor Details
-
ExpressionQueryBuilder
-
-
Method Details
-
getExpression
-
doWriteTo
- Specified by:
doWriteToin classAbstractQueryBuilder<ExpressionQueryBuilder>- Throws:
IOException
-
fieldName
- Specified by:
fieldNamein interfaceMultiTermQueryBuilder
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable- Specified by:
getWriteableNamein interfaceVersionedNamedWriteable
-
doXContent
protected void doXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
doXContentin classAbstractQueryBuilder<ExpressionQueryBuilder>- Throws:
IOException
-
doToQuery
- Specified by:
doToQueryin classAbstractQueryBuilder<ExpressionQueryBuilder>
-
doHashCode
protected int doHashCode()- Specified by:
doHashCodein classAbstractQueryBuilder<ExpressionQueryBuilder>
-
doEquals
- Specified by:
doEqualsin classAbstractQueryBuilder<ExpressionQueryBuilder>
-
getMinimalSupportedVersion
- Specified by:
getMinimalSupportedVersionin interfaceVersionedNamedWriteable
-