java.lang.Object
org.elasticsearch.xpack.esql.core.querydsl.query.Query
org.elasticsearch.xpack.esql.core.querydsl.query.BoolQuery

public class BoolQuery extends Query
Query representing boolean AND or boolean OR.
  • Constructor Details

    • BoolQuery

      public BoolQuery(Source source, boolean isAnd, Query left, Query right)
    • BoolQuery

      public BoolQuery(Source source, boolean isAnd, List<Query> queries)
  • Method Details

    • asBuilder

      protected QueryBuilder asBuilder()
      Description copied from class: Query
      Used internally to convert to retrieve a QueryBuilder by queries.
      Specified by:
      asBuilder in class Query
    • isAnd

      public boolean isAnd()
    • queries

      public List<Query> queries()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Query
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Query
    • innerToString

      protected String innerToString()
      Description copied from class: Query
      Used by Query.toString() to produce a pretty string.
      Specified by:
      innerToString in class Query
    • negate

      public Query negate(Source source)
      Description copied from class: Query
      Negate this query, returning a query that includes documents that would return false when running the represented operation. The default implementation just returns a NotQuery wrapping this because most queries don't model underlying operations that can return null. Queries that model expressions that can return null must make sure all documents that would return null are still excluded from the match.
      Overrides:
      negate in class Query
    • scorable

      public boolean scorable()
      Description copied from class: Query
      Defines whether a query should contribute to the overall score
      Overrides:
      scorable in class Query