Elastic Search Notes
  • Introduction
  • Full Text
  • Aggregations
    • Facets Vs Aggregations
  • Filters
  • References
  • Tools
  • Query DSL
    • Query and filter context
      • Query context
      • Filter context
      • Filtered Vs filter
      • termQuery vs. termFilter
    • Term level queries vs full text queries
  • Parent Child Relationship
  • Nodes
    • Master Node
  • Elastic Search Networking
  • Logstash
    • HighAvailability
    • Grok patterns
  • KeyConcepts
    • Shard
    • Segment
    • Translog
  • Document CRUD operations
    • Updates
  • adv topics
  • Relevance
    • BM25 Scoring Formula
  • Named Queries
Powered by GitBook
On this page

Was this helpful?

Query DSL

PreviousToolsNextQuery and filter context

Last updated 5 years ago

Was this helpful?

Elasticsearch provides a full Query DSL (Domain Specific Language) based on JSON to define queries. Think of the Query DSL as an AST (Abstract Syntax Tree) of queries, consisting of two types of clauses:

Leaf query clauses

Leaf query clauses look for a particular value in a particular field, such as the , or

queries. These queries can be used by themselves.

Compound query clauses

Compound query clauses wrap other leaf or compound queries and are used to combine multiple queries in a logical fashion (such as the or query), or to alter their behaviour (such as the query).

Query clauses behave differently depending on whether they are used in .

match
term
range
bool
dis_max
constant_score
query context or filter context