35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
[[query-dsl]]
|
|
= Query DSL
|
|
|
|
[partintro]
|
|
--
|
|
*elasticsearch* provides a full Query DSL based on JSON to define
|
|
queries. In general, there are basic queries such as
|
|
<<query-dsl-term-query,term>> or
|
|
<<query-dsl-prefix-query,prefix>>. There are
|
|
also compound queries like the
|
|
<<query-dsl-bool-query,bool>> query.
|
|
|
|
While queries have scoring capabilities, in some contexts they will
|
|
only be used to filter the result set, such as in the
|
|
<<query-dsl-filtered-query,filtered>> or
|
|
<<query-dsl-constant-score-query,constant_score>>
|
|
queries.
|
|
|
|
Think of the Query DSL as an AST of queries.
|
|
Some queries can be used by themselves like the
|
|
<<query-dsl-term-query,term>> query but other queries can contain
|
|
queries (like the <<query-dsl-bool-query,bool>> query), and each
|
|
of these composite queries can contain *any* query of the list of
|
|
queries, resulting in the ability to build quite
|
|
complex (and interesting) queries.
|
|
|
|
Queries can be used in different APIs. For example,
|
|
within a <<search-request-query,search query>>, or
|
|
as an <<search-aggregations-bucket-filter-aggregation,aggregation filter>>.
|
|
This section explains the queries that can form the AST one can use.
|
|
|
|
--
|
|
|
|
include::query-dsl/index.asciidoc[]
|