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

public class NotQuery extends Query
Query that inverts the set of matched documents.
  • Constructor Details

    • NotQuery

      public NotQuery(Source source, Query child)
  • Method Details

    • child

      public Query child()
    • 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
    • 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
    • containsPlan

      public boolean containsPlan()
      Description copied from class: Query
      Does the result of calling Query.asBuilder() need the plan to serialize itself?
      Specified by:
      containsPlan in class Query