Querying (Query DSL)

Lessons in this group, roughly in build order:

  • query-dsl-overview — The Query DSL is Elasticsearch’s JSON tree language for describing searches, sent in the query field of…
  • query-vs-filter-context — Every clause runs in one of two contexts: query context asks “how well does this match?” and computes a…
  • match-match-phrase-queries — match is the workhorse full-text query: it analyzes your input the same way the field was indexed, then…
  • term-level-queries — Term-level queries match the exact, un-analyzed value stored in the inverted-index — term, terms, exists,…
  • bool-query-must-should-must-not-filter — bool is the primary compound query: it combines leaf clauses with boolean logic across four occurrence…
  • range-queries — A range query matches documents whose numeric, date, or ip field falls within gte/gt/lte/lt bounds
  • full-text-search — Full-text search matches text fields by analyzing the query the same way the field was indexed, then…
  • compound-queries — Compound queries wrap or combine other queries to change their logic or score — bool, dis_max,…
  • relevance-scoring-bm25 — BM25 (Best Match 25) is the default similarity that turns term matches into the _score ranking each hit —…
  • pagination-from-size-search-after-scroll — Elasticsearch offers three ways to page through results — shallow from/size, cursor-based search_after,…
  • sorting — The sort clause orders hits by one or more fields (or _score), overriding the default relevance ranking
  • highlighting — Highlighting returns snippets of matching fields with the query terms wrapped in tags, so a UI can show…