To define queries, Elasticsearch typically provides a query Domain Specific Language (DSL) based on JSON. There are two types of clauses in Query DSL:  A leaf query clause searches for specific values in a field or fields. They can be used separately. These queries include matches, terms, and range queries. A compound query clause is made up of a leaf query and several other compound queries. These queries combine several queries to produce the desired results.