Full-text queries #
Queries that analyze text: the match family, query_string, boolean
composition, the span family and the intervals rule language for
positional logic. Scoring queries that never touch an analyzer —
similarity, scripts, proximity — are the
specialized
queries.
The match family #
- Match — analyzed text, number, date or boolean
- Phrase — the exact term sequence, in order
(also accepted:
match_phrase) - Match all — every document (and
match_none) - Multi-match — one text across several fields, per-field boosts
Composition and compact syntax #
- Boolean query —
must/filter/should/must_not - Query string — the compact
field:value AND …syntax (also powers?q=)
Positional logic #
- Span queries —
span_term/span_nearand friends, term positions exposed - Intervals — the rule language for proximity: sequences, gaps, unions, filters
SQL twins:
match → MATCH(field, '…'),
phrase → MATCH_PHRASE(field, '…'),
match_all → a bare SELECT, and
bool
composes with AND / OR / NOT. The rest — query_string,
multi_match, the span family, intervals, and the
specialized
queries — stay DSL-side for now.