Class SingleValueQuery
java.lang.Object
org.elasticsearch.xpack.esql.core.querydsl.query.Query
org.elasticsearch.xpack.esql.querydsl.query.SingleValueQuery
Lucene query that wraps another query and only selects documents that match
the wrapped query and have a single field value.
This allows us to wrap regular lucene queries to have ESQL style semantics which will allow us to continue to push expressions to Lucene.
We could have chosen not to wrap the lucene query and instead double check the results after they are loaded. That could be faster in some cases, but for now we're going to always wrap so we can always push. When we find cases where double checking is better we'll try that.
NOTE: This will only work with text fields.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classBuilds aboolquery combining the "next" query and aSingleValueMatchQuery.static classBuilds a query matching either ignored values OR the union ofnextquery andSingleValueMatchQuery.static classBuilds aboolquery ANDing the "next" query, aSingleValueMatchQuery, and aTermQuerymaking sure we didn't ignore any values.static enum -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.esql.core.querydsl.query.Query
NO_SCORE_BOOST -
Constructor Summary
ConstructorsConstructorDescriptionSingleValueQuery(Query next, String field, boolean useSyntheticSourceDelegate) Build.SingleValueQuery(Query next, String field, SingleValueQuery.UseSyntheticSourceDelegate useSyntheticSourceDelegate) -
Method Summary
Modifier and TypeMethodDescriptionprotected SingleValueQuery.AbstractBuilderbooleanbooleaninthashCode()protected String
-
Field Details
-
ENTRY
-
-
Constructor Details
-
SingleValueQuery
Build.- Parameters:
next- the query whose documents we should use for single-valued fieldsfield- the name of the field whose values to checkuseSyntheticSourceDelegate- Should we check the field's synthetic source delegate (true) or it's values itself? If the field is atextfield we often want to use its delegate.
-
SingleValueQuery
public SingleValueQuery(Query next, String field, SingleValueQuery.UseSyntheticSourceDelegate useSyntheticSourceDelegate)
-
-
Method Details
-
asBuilder
-
innerToString
- Specified by:
innerToStringin classQuery
-
negate
-
equals
-
hashCode
public int hashCode() -
containsPlan
public boolean containsPlan()- Specified by:
containsPlanin classQuery
-