01 · DATA MODEL

Query types

Every supported query is a variant of a single QueryNode enum. They all compile to the same execution plan, so mixing and matching them under a bool wrapper is free — there's no orchestrator round trip.

Structural

match_allEverything in the index.
match_noneNothing. Useful inside bool branches.
boolmust · should · must_not · filter
constant_scoreWrap a filter with a fixed score.
boostedMultiply the score of a sub-query.

Term-level

termExact-value keyword match.
termsOR of many term values.
rangeNumeric / date range filter.
prefixKeyword prefix match.
wildcardGlob-style keyword match.
existsField has a non-null value.
idsFetch docs by id.

Full-text

matchAnalyzed full-text query.
match_phrasePhrase with positional match.
match_phrase_prefixPhrase + prefix on last term.
multi_matchMatch across multiple fields.
query_stringLucene-style mini-DSL.
simple_query_stringSafe subset for end-user input.

Extended

fuzzyEdit-distance match.
regexpRegular expression term match.
span_termPositional anchor for span queries.
span_nearTerms within N positions.
span_orUnion of span queries.
span_notExclusion within span windows.
span_firstAnchor near the start of a field.

AI-native

knnVector kNN with per-query ef_search.
hybridRRF / linear / learned fusion of queries.

Specialized

geo_distanceDistance-from-point filter.
geo_bounding_boxBounding-box filter.
nestedQuery inside a nested field.
more_like_thisFind similar docs by text fingerprint.
pinnedBoost specific docs to the top.
function_scoreRewrite scores with functions.
dis_maxMax-score across disjuncts.
boostingPositive / negative branches.

Source · engine/crates/query/src/ast.rs · enum QueryNode