Expand description
Query DSL: AST types, JSON parser, and execution framework.
Implements the Query → BoundQuery → ScorerSupplier → Scorer pipeline
from [[architecture-query-execution]]. Queries are parsed from JSON, bound to
index-level statistics, then per-segment scorers are built.
See [[query-dsl]] and [[architecture-query-execution|milestone-2]].
Modules§
- ast
- Query expression types — the output of JSON parsing and input to execution.
- boolean
- BoolQuery: boolean combination of sub-queries.
- boost
- Boost wrapper: multiplies inner query’s score by a constant factor.
- boosting
- Boosting query: positive query with score demotion for negative matches.
- constant_
score - ConstantScoreQuery: wrap a query with a fixed score.
- convert
- Convert
ScoringExpressiontrees to executable [Query] objects. - dis_max
- dis_max query: returns the score from the best-matching sub-query, plus tie_breaker * sum of other matching scores.
- exists
- ExistsQuery: match documents where a field has a value.
- function_
score - Function score query: modify query scores using scoring functions.
- fuzzy
- Fuzzy query: match terms within edit distance (Levenshtein).
- match_
query - MatchQuery: analyze query text, build bool of term queries.
- multi_
term - Shared per-segment supplier for constant-score multi-term queries.
- nested
- Nested query: search within nested object arrays with cross-object isolation.
- parser
- JSON query parser — converts ES-compatible JSON to
ScoringExpressiontrees. - phrase
- MatchPhraseQuery: terms must appear in order at consecutive positions.
- prefix
- PrefixQuery: match documents containing terms with a given prefix.
- range
- Range query: match documents where a numeric field falls within a range.
- regex_
automaton - Adapter from
regex_automata::dfa::dense::DFAtofst::Automaton. - regexp
- Regexp query: match terms against a regular expression.
- script_
score - Script score query: custom scoring via compiled expressions.
- span
- Span queries: positional matching with configurable distance and ordering.
- term
- TermQuery: exact term match on a field.
- wildcard
- Wildcard query: match terms using * (any chars) and ? (single char).
Traits§
- Scorer
Supplier - Knows the estimated cost of scoring before a scorer is built.