Skip to main content

Module parser

Module parser 

Source
Expand description

JSON query parser — converts ES-compatible JSON to ScoringExpression trees.

Supports both the full object form and shorthand forms:

  • {"term": {"status": {"value": "active"}}} (full)
  • {"term": {"status": "active"}} (shorthand)
  • {"match": {"title": {"query": "search engine"}}} (full)
  • {"match": {"title": "search engine"}} (shorthand)

See [[query-dsl]] and [[architecture-query-execution#Step 5]].

Functions§

parse_distance_km
Parse distance string like “10km”, “5mi”, “1000m”. Returns km.
parse_query
Parse a JSON query into a ScoringExpression.
parse_query_expression
Parse a JSON query into a QueryExpression.