Interface TranslationAware
- All Known Subinterfaces:
TranslationAware.SingleValueTranslationAware
- All Known Implementing Classes:
And,BinaryLogic,CIDRMatch,EndsWith,Equals,EsqlBinaryComparison,FullTextFunction,GreaterThan,GreaterThanOrEqual,In,InsensitiveBinaryComparison,InsensitiveEquals,IsNotNull,IsNull,Kql,LessThan,LessThanOrEqual,Match,MatchOperator,MultiMatchQueryPredicate,Not,NotEquals,Or,QueryString,Range,RLike,SpatialContains,SpatialDisjoint,SpatialIntersects,SpatialRelatesFunction,SpatialWithin,StartsWith,Term,WildcardLike
public interface TranslationAware
Expressions implementing this interface can get called on data nodes to provide an Elasticsearch/Lucene query.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceSubinterface for expressions that can only process single values (and null out on MVs). -
Method Summary
Modifier and TypeMethodDescriptionasQuery(TranslatorHandler handler) Translates the implementing expression into a Query.booleantranslatable(LucenePushdownPredicates pushdownPredicates) Indicates whether the expression can be translated or not.
-
Method Details
-
translatable
Indicates whether the expression can be translated or not. Usually checks whether the expression arguments are actual fields that exist in Lucene. -
asQuery
Translates the implementing expression into a Query. If during translation a child needs to be translated first, the handler needs to be used even if the child implements this interface as well. This is to ensure that the child is wrapped in a SingleValueQuery if necessary.So use this:
Query childQuery = handler.asQuery(child);and not this:
Query childQuery = child.asQuery(handler);
-