kaquel.es_query – ElasticSearch query related utilities

exception kaquel.es_query.InvalidQuery(message: str | None = None, /, *, raw_query: dict, context: str)

Bases: Error

Invalid ElasticSearch query.

Parameters:
  • message – Message to display.

  • raw_query – Raw query that could not be decoded.

  • context – Context at which the query could not be decoded.

kaquel.es_query.parse_es_query(query: Any, /) Query

Parse an ElasticSearch query.

Parameters:

query – JSON-encoded query, or query decoded as a dictionary.

Returns:

Parsed query.