diff options
author | Hilko Bengen <bengen@debian.org> | 2014-06-07 12:02:12 +0200 |
---|---|---|
committer | Hilko Bengen <bengen@debian.org> | 2014-06-07 12:02:12 +0200 |
commit | d5ed89b946297270ec28abf44bef2371a06f1f4f (patch) | |
tree | ce2d945e4dde69af90bd9905a70d8d27f4936776 /docs/reference/query-dsl.asciidoc | |
download | elasticsearch-d5ed89b946297270ec28abf44bef2371a06f1f4f.tar.gz |
Imported Upstream version 1.0.3upstream/1.0.3
Diffstat (limited to 'docs/reference/query-dsl.asciidoc')
-rw-r--r-- | docs/reference/query-dsl.asciidoc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/docs/reference/query-dsl.asciidoc b/docs/reference/query-dsl.asciidoc new file mode 100644 index 0000000..32c1fb5 --- /dev/null +++ b/docs/reference/query-dsl.asciidoc @@ -0,0 +1,42 @@ +[[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. Queries can +also have filters associated with them such as the +<<query-dsl-filtered-query,filtered>> or +<<query-dsl-constant-score-query,constant_score>> +queries, with specific filter queries. + +Think of the Query DSL as an AST of queries. Certain queries can contain +other queries (like the +<<query-dsl-bool-query,bool>> query), others can +contain filters (like the +<<query-dsl-constant-score-query,constant_score>>), +and some can contain both a query and a filter (like the +<<query-dsl-filtered-query,filtered>>). Each of +those can contain *any* query of the list of queries or *any* filter +from the list of filters, resulting in the ability to build quite +complex (and interesting) queries. + +Both queries and filters can be used in different APIs. For example, +within a <<search-request-query,search query>>, or +as a <<search-facets,facet filter>>. This +section explains the components (queries and filters) that can form the +AST one can use. + +Filters are very handy since they perform an order of magnitude better +than plain queries since no scoring is performed and they are +automatically cached. + +-- + +include::query-dsl/queries.asciidoc[] + +include::query-dsl/filters.asciidoc[] |