[DOCS] Make Query DSL titles consistent (#43935)

This commit is contained in:
James Rodewig 2019-07-18 10:18:11 -04:00
parent 452f7f67a0
commit 661f70183e
58 changed files with 341 additions and 228 deletions

View File

@ -29,22 +29,22 @@ Query clauses behave differently depending on whether they are used in
include::query-dsl/query_filter_context.asciidoc[] include::query-dsl/query_filter_context.asciidoc[]
include::query-dsl/match-all-query.asciidoc[] include::query-dsl/compound-queries.asciidoc[]
include::query-dsl/full-text-queries.asciidoc[] include::query-dsl/full-text-queries.asciidoc[]
include::query-dsl/term-level-queries.asciidoc[] include::query-dsl/geo-queries.asciidoc[]
include::query-dsl/compound-queries.asciidoc[]
include::query-dsl/joining-queries.asciidoc[] include::query-dsl/joining-queries.asciidoc[]
include::query-dsl/geo-queries.asciidoc[] include::query-dsl/match-all-query.asciidoc[]
include::query-dsl/special-queries.asciidoc[]
include::query-dsl/span-queries.asciidoc[] include::query-dsl/span-queries.asciidoc[]
include::query-dsl/special-queries.asciidoc[]
include::query-dsl/term-level-queries.asciidoc[]
include::query-dsl/minimum-should-match.asciidoc[] include::query-dsl/minimum-should-match.asciidoc[]
include::query-dsl/multi-term-rewrite.asciidoc[] include::query-dsl/multi-term-rewrite.asciidoc[]

View File

@ -1,5 +1,8 @@
[[query-dsl-bool-query]] [[query-dsl-bool-query]]
=== Bool Query === Boolean query
++++
<titleabbrev>Boolean</titleabbrev>
++++
A query that matches documents matching boolean combinations of other A query that matches documents matching boolean combinations of other
queries. The bool query maps to Lucene `BooleanQuery`. It is built using queries. The bool query maps to Lucene `BooleanQuery`. It is built using

View File

@ -1,5 +1,8 @@
[[query-dsl-boosting-query]] [[query-dsl-boosting-query]]
=== Boosting Query === Boosting query
++++
<titleabbrev>Boosting</titleabbrev>
++++
Returns documents matching a `positive` query while reducing the Returns documents matching a `positive` query while reducing the
<<query-filter-context, relevance score>> of documents that also match a <<query-filter-context, relevance score>> of documents that also match a

View File

@ -7,39 +7,34 @@ filter context.
The queries in this group are: The queries in this group are:
<<query-dsl-constant-score-query,`constant_score` query>>::
A query which wraps another query, but executes it in filter context. All
matching documents are given the same ``constant'' `_score`.
<<query-dsl-bool-query,`bool` query>>:: <<query-dsl-bool-query,`bool` query>>::
The default query for combining multiple leaf or compound query clauses, as The default query for combining multiple leaf or compound query clauses, as
`must`, `should`, `must_not`, or `filter` clauses. The `must` and `should` `must`, `should`, `must_not`, or `filter` clauses. The `must` and `should`
clauses have their scores combined -- the more matching clauses, the better -- clauses have their scores combined -- the more matching clauses, the better --
while the `must_not` and `filter` clauses are executed in filter context. while the `must_not` and `filter` clauses are executed in filter context.
<<query-dsl-dis-max-query,`dis_max` query>>:: <<query-dsl-boosting-query,`boosting` query>>::
Return documents which match a `positive` query, but reduce the score of
documents which also match a `negative` query.
<<query-dsl-constant-score-query,`constant_score` query>>::
A query which wraps another query, but executes it in filter context. All
matching documents are given the same ``constant'' `_score`.
<<query-dsl-dis-max-query,`dis_max` query>>::
A query which accepts multiple queries, and returns any documents which match A query which accepts multiple queries, and returns any documents which match
any of the query clauses. While the `bool` query combines the scores from all any of the query clauses. While the `bool` query combines the scores from all
matching queries, the `dis_max` query uses the score of the single best- matching queries, the `dis_max` query uses the score of the single best-
matching query clause. matching query clause.
<<query-dsl-function-score-query,`function_score` query>>:: <<query-dsl-function-score-query,`function_score` query>>::
Modify the scores returned by the main query with functions to take into Modify the scores returned by the main query with functions to take into
account factors like popularity, recency, distance, or custom algorithms account factors like popularity, recency, distance, or custom algorithms
implemented with scripting. implemented with scripting.
<<query-dsl-boosting-query,`boosting` query>>::
Return documents which match a `positive` query, but reduce the score of
documents which also match a `negative` query.
include::constant-score-query.asciidoc[]
include::bool-query.asciidoc[] include::bool-query.asciidoc[]
include::dis-max-query.asciidoc[]
include::function-score-query.asciidoc[]
include::boosting-query.asciidoc[] include::boosting-query.asciidoc[]
include::constant-score-query.asciidoc[]
include::dis-max-query.asciidoc[]
include::function-score-query.asciidoc[]

View File

@ -1,5 +1,8 @@
[[query-dsl-constant-score-query]] [[query-dsl-constant-score-query]]
=== Constant Score Query === Constant score query
++++
<titleabbrev>Constant score</titleabbrev>
++++
Wraps a <<query-dsl-bool-query, filter query>> and returns every matching Wraps a <<query-dsl-bool-query, filter query>> and returns every matching
document with a <<query-filter-context, relevance score>> equal to the `boost` document with a <<query-filter-context, relevance score>> equal to the `boost`

View File

@ -1,5 +1,8 @@
[[query-dsl-dis-max-query]] [[query-dsl-dis-max-query]]
=== Disjunction Max Query === Disjunction max query
++++
<titleabbrev>Disjunction max</titleabbrev>
++++
Returns documents matching one or more wrapped queries, called query clauses or Returns documents matching one or more wrapped queries, called query clauses or
clauses. clauses.

View File

@ -1,5 +1,8 @@
[[query-dsl-distance-feature-query]] [[query-dsl-distance-feature-query]]
=== Distance Feature Query === Distance feature query
++++
<titleabbrev>Distance feature</titleabbrev>
++++
The `distance_feature` query is a specialized query that only works The `distance_feature` query is a specialized query that only works
on <<date, `date`>>, <<date_nanos, `date_nanos`>> or <<geo-point,`geo_point`>> on <<date, `date`>>, <<date_nanos, `date_nanos`>> or <<geo-point,`geo_point`>>

View File

@ -1,5 +1,8 @@
[[query-dsl-exists-query]] [[query-dsl-exists-query]]
=== Exists Query === Exists query
++++
<titleabbrev>Exists</titleabbrev>
++++
Returns documents that contain an indexed value for a field. Returns documents that contain an indexed value for a field.

View File

@ -7,62 +7,55 @@ the field during indexing.
The queries in this group are: The queries in this group are:
<<query-dsl-intervals-query,`intervals` query>>::
A full text query that allows fine-grained control of the ordering and
proximity of matching terms.
<<query-dsl-match-query,`match` query>>:: <<query-dsl-match-query,`match` query>>::
The standard query for performing full text queries, including fuzzy matching
The standard query for performing full text queries, including fuzzy matching and phrase or proximity queries.
and phrase or proximity queries.
<<query-dsl-match-query-phrase,`match_phrase` query>>::
Like the `match` query but used for matching exact phrases or word proximity matches.
<<query-dsl-match-query-phrase-prefix,`match_phrase_prefix` query>>::
Like the `match_phrase` query, but does a wildcard search on the final word.
<<query-dsl-match-bool-prefix-query,`match_bool_prefix` query>>:: <<query-dsl-match-bool-prefix-query,`match_bool_prefix` query>>::
Creates a `bool` query that matches each term as a `term` query, except for
the last term, which is matched as a `prefix` query
Creates a `bool` query that matches each term as a `term` query, except for <<query-dsl-match-query-phrase,`match_phrase` query>>::
the last term, which is matched as a `prefix` query Like the `match` query but used for matching exact phrases or word proximity matches.
<<query-dsl-match-query-phrase-prefix,`match_phrase_prefix` query>>::
Like the `match_phrase` query, but does a wildcard search on the final word.
<<query-dsl-multi-match-query,`multi_match` query>>:: <<query-dsl-multi-match-query,`multi_match` query>>::
The multi-field version of the `match` query.
The multi-field version of the `match` query.
<<query-dsl-common-terms-query,`common` terms query>>:: <<query-dsl-common-terms-query,`common` terms query>>::
A more specialized query which gives more preference to uncommon words. A more specialized query which gives more preference to uncommon words.
<<query-dsl-query-string-query,`query_string` query>>:: <<query-dsl-query-string-query,`query_string` query>>::
Supports the compact Lucene <<query-string-syntax,query string syntax>>,
Supports the compact Lucene <<query-string-syntax,query string syntax>>, allowing you to specify AND|OR|NOT conditions and multi-field search
allowing you to specify AND|OR|NOT conditions and multi-field search within a single query string. For expert users only.
within a single query string. For expert users only.
<<query-dsl-simple-query-string-query,`simple_query_string` query>>:: <<query-dsl-simple-query-string-query,`simple_query_string` query>>::
A simpler, more robust version of the `query_string` syntax suitable
for exposing directly to users.
A simpler, more robust version of the `query_string` syntax suitable
for exposing directly to users.
<<query-dsl-intervals-query,`intervals` query>>:: include::intervals-query.asciidoc[]
A full text query that allows fine-grained control of the ordering and
proximity of matching terms
include::match-query.asciidoc[] include::match-query.asciidoc[]
include::match-bool-prefix-query.asciidoc[]
include::match-phrase-query.asciidoc[] include::match-phrase-query.asciidoc[]
include::match-phrase-prefix-query.asciidoc[] include::match-phrase-prefix-query.asciidoc[]
include::match-bool-prefix-query.asciidoc[]
include::multi-match-query.asciidoc[] include::multi-match-query.asciidoc[]
include::common-terms-query.asciidoc[] include::common-terms-query.asciidoc[]
include::query-string-query.asciidoc[] include::query-string-query.asciidoc[]
include::simple-query-string-query.asciidoc[] include::simple-query-string-query.asciidoc[]
include::intervals-query.asciidoc[]

View File

@ -1,5 +1,8 @@
[[query-dsl-function-score-query]] [[query-dsl-function-score-query]]
=== Function Score Query === Function score query
++++
<titleabbrev>Function score</titleabbrev>
++++
The `function_score` allows you to modify the score of documents that are The `function_score` allows you to modify the score of documents that are
retrieved by a query. This can be useful if, for example, a score retrieved by a query. This can be useful if, for example, a score

View File

@ -1,5 +1,8 @@
[[query-dsl-fuzzy-query]] [[query-dsl-fuzzy-query]]
=== Fuzzy Query === Fuzzy query
++++
<titleabbrev>Fuzzy</titleabbrev>
++++
The fuzzy query uses similarity based on Levenshtein edit distance. The fuzzy query uses similarity based on Levenshtein edit distance.

View File

@ -1,5 +1,8 @@
[[query-dsl-geo-bounding-box-query]] [[query-dsl-geo-bounding-box-query]]
=== Geo Bounding Box Query === Geo-bounding box query
++++
<titleabbrev>Geo-bounding box</titleabbrev>
++++
A query allowing to filter hits based on a point location using a A query allowing to filter hits based on a point location using a
bounding box. Assuming the following indexed document: bounding box. Assuming the following indexed document:

View File

@ -1,5 +1,8 @@
[[query-dsl-geo-distance-query]] [[query-dsl-geo-distance-query]]
=== Geo Distance Query === Geo-distance query
++++
<titleabbrev>Geo-distance</titleabbrev>
++++
Filters documents that include only hits that exists within a specific Filters documents that include only hits that exists within a specific
distance from a geo point. Assuming the following mapping and indexed distance from a geo point. Assuming the following mapping and indexed

View File

@ -1,5 +1,8 @@
[[query-dsl-geo-polygon-query]] [[query-dsl-geo-polygon-query]]
=== Geo Polygon Query === Geo-polygon query
++++
<titleabbrev>Geo-polygon</titleabbrev>
++++
A query returning hits that only fall within a polygon of A query returning hits that only fall within a polygon of
points. Here is an example: points. Here is an example:

View File

@ -8,29 +8,24 @@ lines, circles, polygons, multi-polygons, etc.
The queries in this group are: The queries in this group are:
<<query-dsl-geo-shape-query,`geo_shape`>> query::
Finds documents with geo-shapes which either intersect, are contained by, or
do not intersect with the specified geo-shape.
<<query-dsl-geo-bounding-box-query,`geo_bounding_box`>> query:: <<query-dsl-geo-bounding-box-query,`geo_bounding_box`>> query::
Finds documents with geo-points that fall into the specified rectangle.
Finds documents with geo-points that fall into the specified rectangle.
<<query-dsl-geo-distance-query,`geo_distance`>> query:: <<query-dsl-geo-distance-query,`geo_distance`>> query::
Finds documents with geo-points within the specified distance of a central point.
Finds documents with geo-points within the specified distance of a central
point.
<<query-dsl-geo-polygon-query,`geo_polygon`>> query:: <<query-dsl-geo-polygon-query,`geo_polygon`>> query::
Find documents with geo-points within the specified polygon.
Find documents with geo-points within the specified polygon. <<query-dsl-geo-shape-query,`geo_shape`>> query::
Finds documents with geo-shapes which either intersect, are contained by, or do not intersect with the specified
geo-shape.
include::geo-shape-query.asciidoc[]
include::geo-bounding-box-query.asciidoc[] include::geo-bounding-box-query.asciidoc[]
include::geo-distance-query.asciidoc[] include::geo-distance-query.asciidoc[]
include::geo-polygon-query.asciidoc[] include::geo-polygon-query.asciidoc[]
include::geo-shape-query.asciidoc[]

View File

@ -1,5 +1,8 @@
[[query-dsl-geo-shape-query]] [[query-dsl-geo-shape-query]]
=== GeoShape Query === Geo-shape query
++++
<titleabbrev>Geo-shape</titleabbrev>
++++
Filter documents indexed using the `geo_shape` type. Filter documents indexed using the `geo_shape` type.

View File

@ -1,5 +1,8 @@
[[query-dsl-has-child-query]] [[query-dsl-has-child-query]]
=== Has Child Query === Has child query
++++
<titleabbrev>Has child</titleabbrev>
++++
Returns parent documents whose <<parent-join,joined>> child documents match a Returns parent documents whose <<parent-join,joined>> child documents match a
provided query. You can create parent-child relationships between documents in provided query. You can create parent-child relationships between documents in

View File

@ -1,5 +1,8 @@
[[query-dsl-has-parent-query]] [[query-dsl-has-parent-query]]
=== Has Parent Query === Has parent query
++++
<titleabbrev>Has parent</titleabbrev>
++++
The `has_parent` query accepts a query and a parent type. The query is The `has_parent` query accepts a query and a parent type. The query is
executed in the parent document space, which is specified by the parent executed in the parent document space, which is specified by the parent

View File

@ -1,5 +1,9 @@
[[query-dsl-ids-query]] [[query-dsl-ids-query]]
=== Ids Query === IDs
++++
<titleabbrev>IDs</titleabbrev>
++++
Returns documents based on their IDs. This query uses document IDs stored in Returns documents based on their IDs. This query uses document IDs stored in
the <<mapping-id-field,`_id`>> field. the <<mapping-id-field,`_id`>> field.

View File

@ -1,5 +1,8 @@
[[query-dsl-intervals-query]] [[query-dsl-intervals-query]]
=== Intervals query === Intervals query
++++
<titleabbrev>Intervals</titleabbrev>
++++
An `intervals` query allows fine-grained control over the order and proximity of An `intervals` query allows fine-grained control over the order and proximity of
matching terms. Matching rules are constructed from a small set of definitions, matching terms. Matching rules are constructed from a small set of definitions,

View File

@ -6,13 +6,11 @@ prohibitively expensive. Instead, Elasticsearch offers two forms of join
which are designed to scale horizontally. which are designed to scale horizontally.
<<query-dsl-nested-query,`nested` query>>:: <<query-dsl-nested-query,`nested` query>>::
Documents may contain fields of type <<nested,`nested`>>. These Documents may contain fields of type <<nested,`nested`>>. These
fields are used to index arrays of objects, where each object can be queried fields are used to index arrays of objects, where each object can be queried
(with the `nested` query) as an independent document. (with the `nested` query) as an independent document.
<<query-dsl-has-child-query,`has_child`>> and <<query-dsl-has-parent-query,`has_parent`>> queries:: <<query-dsl-has-child-query,`has_child`>> and <<query-dsl-has-parent-query,`has_parent`>> queries::
A <<parent-join,`join` field relationship>> can exist between A <<parent-join,`join` field relationship>> can exist between
documents within a single index. The `has_child` query returns parent documents within a single index. The `has_child` query returns parent
documents whose child documents match the specified query, while the documents whose child documents match the specified query, while the

View File

@ -1,5 +1,8 @@
[[query-dsl-match-all-query]] [[query-dsl-match-all-query]]
== Match All Query == Match all query
++++
<titleabbrev>Match all</titleabbrev>
++++
The most simple query, which matches all documents, giving them all a `_score` The most simple query, which matches all documents, giving them all a `_score`
of `1.0`. of `1.0`.

View File

@ -1,5 +1,8 @@
[[query-dsl-match-bool-prefix-query]] [[query-dsl-match-bool-prefix-query]]
=== Match Bool Prefix Query === Match boolean prefix query
++++
<titleabbrev>Match boolean prefix</titleabbrev>
++++
A `match_bool_prefix` query analyzes its input and constructs a A `match_bool_prefix` query analyzes its input and constructs a
<<query-dsl-bool-query,`bool` query>> from the terms. Each term except the last <<query-dsl-bool-query,`bool` query>> from the terms. Each term except the last

View File

@ -1,5 +1,8 @@
[[query-dsl-match-query-phrase-prefix]] [[query-dsl-match-query-phrase-prefix]]
=== Match Phrase Prefix Query === Match phrase prefix query
++++
<titleabbrev>Match phrase prefix</titleabbrev>
++++
The `match_phrase_prefix` is the same as `match_phrase`, except that it The `match_phrase_prefix` is the same as `match_phrase`, except that it
allows for prefix matches on the last term in the text. For example: allows for prefix matches on the last term in the text. For example:

View File

@ -1,5 +1,8 @@
[[query-dsl-match-query-phrase]] [[query-dsl-match-query-phrase]]
=== Match Phrase Query === Match phrase query
++++
<titleabbrev>Match phrase</titleabbrev>
++++
The `match_phrase` query analyzes the text and creates a `phrase` query The `match_phrase` query analyzes the text and creates a `phrase` query
out of the analyzed text. For example: out of the analyzed text. For example:

View File

@ -1,5 +1,8 @@
[[query-dsl-match-query]] [[query-dsl-match-query]]
=== Match Query === Match query
++++
<titleabbrev>Match</titleabbrev>
++++
`match` queries accept text/numerics/dates, analyzes `match` queries accept text/numerics/dates, analyzes

View File

@ -1,5 +1,5 @@
[[query-dsl-minimum-should-match]] [[query-dsl-minimum-should-match]]
== Minimum Should Match == `minimum_should_match` parameter
The `minimum_should_match` parameter possible values: The `minimum_should_match` parameter possible values:

View File

@ -1,5 +1,8 @@
[[query-dsl-mlt-query]] [[query-dsl-mlt-query]]
=== More Like This Query === More like this query
++++
<titleabbrev>More like this</titleabbrev>
++++
The More Like This Query finds documents that are "like" a given The More Like This Query finds documents that are "like" a given
set of documents. In order to do so, MLT selects a set of representative terms set of documents. In order to do so, MLT selects a set of representative terms

View File

@ -1,5 +1,8 @@
[[query-dsl-multi-match-query]] [[query-dsl-multi-match-query]]
=== Multi Match Query === Multi-match query
++++
<titleabbrev>Multi-match</titleabbrev>
++++
The `multi_match` query builds on the <<query-dsl-match-query,`match` query>> The `multi_match` query builds on the <<query-dsl-match-query,`match` query>>
to allow multi-field queries: to allow multi-field queries:

View File

@ -1,5 +1,5 @@
[[query-dsl-multi-term-rewrite]] [[query-dsl-multi-term-rewrite]]
== `rewrite` Parameter == `rewrite` parameter
WARNING: This parameter is for expert users only. Changing the value of WARNING: This parameter is for expert users only. Changing the value of
this parameter can impact search performance and relevance. this parameter can impact search performance and relevance.

View File

@ -1,5 +1,8 @@
[[query-dsl-nested-query]] [[query-dsl-nested-query]]
=== Nested Query === Nested query
++++
<titleabbrev>Nested</titleabbrev>
++++
Wraps another query to search <<nested,nested>> fields. Wraps another query to search <<nested,nested>> fields.

View File

@ -1,5 +1,8 @@
[[query-dsl-parent-id-query]] [[query-dsl-parent-id-query]]
=== Parent Id Query === Parent ID query
++++
<titleabbrev>Parent ID</titleabbrev>
++++
The `parent_id` query can be used to find child documents which belong to a particular parent. The `parent_id` query can be used to find child documents which belong to a particular parent.
Given the following mapping definition: Given the following mapping definition:

View File

@ -1,5 +1,8 @@
[[query-dsl-percolate-query]] [[query-dsl-percolate-query]]
=== Percolate Query === Percolate query
++++
<titleabbrev>Percolate</titleabbrev>
++++
The `percolate` query can be used to match queries The `percolate` query can be used to match queries
stored in an index. The `percolate` query itself stored in an index. The `percolate` query itself

View File

@ -1,5 +1,8 @@
[[query-dsl-prefix-query]] [[query-dsl-prefix-query]]
=== Prefix Query === Prefix query
++++
<titleabbrev>Prefix</titleabbrev>
++++
Matches documents that have fields containing terms with a specified Matches documents that have fields containing terms with a specified
prefix (*not analyzed*). The prefix query maps to Lucene `PrefixQuery`. prefix (*not analyzed*). The prefix query maps to Lucene `PrefixQuery`.

View File

@ -1,5 +1,8 @@
[[query-dsl-query-string-query]] [[query-dsl-query-string-query]]
=== Query String Query === Query string query
++++
<titleabbrev>Query string</titleabbrev>
++++
A query that uses a query parser in order to parse its content. Here is A query that uses a query parser in order to parse its content. Here is
an example: an example:

View File

@ -1,5 +1,8 @@
[[query-dsl-range-query]] [[query-dsl-range-query]]
=== Range Query === Range query
++++
<titleabbrev>Range</titleabbrev>
++++
Returns documents that contain terms within a provided range. Returns documents that contain terms within a provided range.

View File

@ -1,5 +1,8 @@
[[query-dsl-rank-feature-query]] [[query-dsl-rank-feature-query]]
=== Rank Feature Query === Rank feature query
++++
<titleabbrev>Rank feature</titleabbrev>
++++
The `rank_feature` query is a specialized query that only works on The `rank_feature` query is a specialized query that only works on
<<rank-feature,`rank_feature`>> fields and <<rank-features,`rank_features`>> fields. <<rank-feature,`rank_feature`>> fields and <<rank-features,`rank_features`>> fields.

View File

@ -1,5 +1,8 @@
[[query-dsl-regexp-query]] [[query-dsl-regexp-query]]
=== Regexp Query === Regexp query
++++
<titleabbrev>Regexp</titleabbrev>
++++
The `regexp` query allows you to use regular expression term queries. The `regexp` query allows you to use regular expression term queries.
See <<regexp-syntax>> for details of the supported regular expression language. See <<regexp-syntax>> for details of the supported regular expression language.

View File

@ -1,5 +1,8 @@
[[query-dsl-script-query]] [[query-dsl-script-query]]
=== Script Query === Script query
++++
<titleabbrev>Script</titleabbrev>
++++
A query allowing to define A query allowing to define
<<modules-scripting,scripts>> as queries. They are typically used in a filter <<modules-scripting,scripts>> as queries. They are typically used in a filter

View File

@ -1,5 +1,8 @@
[[query-dsl-script-score-query]] [[query-dsl-script-score-query]]
=== Script Score Query === Script score query
++++
<titleabbrev>Script score</titleabbrev>
++++
The `script_score` allows you to modify the score of documents that are The `script_score` allows you to modify the score of documents that are
retrieved by a query. This can be useful if, for example, a score retrieved by a query. This can be useful if, for example, a score

View File

@ -1,5 +1,8 @@
[[query-dsl-simple-query-string-query]] [[query-dsl-simple-query-string-query]]
=== Simple Query String Query === Simple query string query
++++
<titleabbrev>Simple query string</titleabbrev>
++++
A query that uses the SimpleQueryParser to parse its context. Unlike the A query that uses the SimpleQueryParser to parse its context. Unlike the
regular `query_string` query, the `simple_query_string` query will never regular `query_string` query, the `simple_query_string` query will never

View File

@ -1,5 +1,8 @@
[[query-dsl-span-containing-query]] [[query-dsl-span-containing-query]]
=== Span Containing Query === Span containing query
++++
<titleabbrev>Span containing</titleabbrev>
++++
Returns matches which enclose another span query. The span containing Returns matches which enclose another span query. The span containing
query maps to Lucene `SpanContainingQuery`. Here is an example: query maps to Lucene `SpanContainingQuery`. Here is an example:

View File

@ -1,5 +1,8 @@
[[query-dsl-span-field-masking-query]] [[query-dsl-span-field-masking-query]]
=== Span Field Masking Query === Span field masking query
++++
<titleabbrev>Span field masking</titleabbrev>
++++
Wrapper to allow span queries to participate in composite single-field span queries by 'lying' about their search field. The span field masking query maps to Lucene's `SpanFieldMaskingQuery` Wrapper to allow span queries to participate in composite single-field span queries by 'lying' about their search field. The span field masking query maps to Lucene's `SpanFieldMaskingQuery`

View File

@ -1,5 +1,8 @@
[[query-dsl-span-first-query]] [[query-dsl-span-first-query]]
=== Span First Query === Span first query
++++
<titleabbrev>Span first</titleabbrev>
++++
Matches spans near the beginning of a field. The span first query maps Matches spans near the beginning of a field. The span first query maps
to Lucene `SpanFirstQuery`. Here is an example: to Lucene `SpanFirstQuery`. Here is an example:

View File

@ -1,5 +1,8 @@
[[query-dsl-span-multi-term-query]] [[query-dsl-span-multi-term-query]]
=== Span Multi Term Query === Span multi-term query
++++
<titleabbrev>Span multi-term</titleabbrev>
++++
The `span_multi` query allows you to wrap a `multi term query` (one of wildcard, The `span_multi` query allows you to wrap a `multi term query` (one of wildcard,
fuzzy, prefix, range or regexp query) as a `span query`, so fuzzy, prefix, range or regexp query) as a `span query`, so

View File

@ -1,5 +1,8 @@
[[query-dsl-span-near-query]] [[query-dsl-span-near-query]]
=== Span Near Query === Span near query
++++
<titleabbrev>Span near</titleabbrev>
++++
Matches spans which are near one another. One can specify _slop_, the Matches spans which are near one another. One can specify _slop_, the
maximum number of intervening unmatched positions, as well as whether maximum number of intervening unmatched positions, as well as whether

View File

@ -1,5 +1,8 @@
[[query-dsl-span-not-query]] [[query-dsl-span-not-query]]
=== Span Not Query === Span not query
++++
<titleabbrev>Span not</titleabbrev>
++++
Removes matches which overlap with another span query or which are Removes matches which overlap with another span query or which are
within x tokens before (controlled by the parameter `pre`) or y tokens within x tokens before (controlled by the parameter `pre`) or y tokens

View File

@ -1,5 +1,8 @@
[[query-dsl-span-or-query]] [[query-dsl-span-or-query]]
=== Span Or Query === Span or query
++++
<titleabbrev>Span or</titleabbrev>
++++
Matches the union of its span clauses. The span or query maps to Lucene Matches the union of its span clauses. The span or query maps to Lucene
`SpanOrQuery`. Here is an example: `SpanOrQuery`. Here is an example:

View File

@ -15,62 +15,55 @@ Span queries cannot be mixed with non-span queries (with the exception of the `s
The queries in this group are: The queries in this group are:
<<query-dsl-span-containing-query,`span_containing` query>>::
Accepts a list of span queries, but only returns those spans which also match a second span query.
<<query-dsl-span-field-masking-query,`field_masking_span` query>>::
Allows queries like `span-near` or `span-or` across different fields.
<<query-dsl-span-first-query,`span_first` query>>::
Accepts another span query whose matches must appear within the first N
positions of the field.
<<query-dsl-span-multi-term-query,`span_multi` query>>::
Wraps a <<query-dsl-term-query,`term`>>, <<query-dsl-range-query,`range`>>,
<<query-dsl-prefix-query,`prefix`>>, <<query-dsl-wildcard-query,`wildcard`>>,
<<query-dsl-regexp-query,`regexp`>>, or <<query-dsl-fuzzy-query,`fuzzy`>> query.
<<query-dsl-span-near-query,`span_near` query>>::
Accepts multiple span queries whose matches must be within the specified distance of each other, and possibly in the same order.
<<query-dsl-span-not-query,`span_not` query>>::
Wraps another span query, and excludes any documents which match that query.
<<query-dsl-span-or-query,`span_or` query>>::
Combines multiple span queries -- returns documents which match any of the
specified queries.
<<query-dsl-span-term-query,`span_term` query>>:: <<query-dsl-span-term-query,`span_term` query>>::
The equivalent of the <<query-dsl-term-query,`term` query>> but for use with The equivalent of the <<query-dsl-term-query,`term` query>> but for use with
other span queries. other span queries.
<<query-dsl-span-multi-term-query,`span_multi` query>>::
Wraps a <<query-dsl-term-query,`term`>>, <<query-dsl-range-query,`range`>>,
<<query-dsl-prefix-query,`prefix`>>, <<query-dsl-wildcard-query,`wildcard`>>,
<<query-dsl-regexp-query,`regexp`>>, or <<query-dsl-fuzzy-query,`fuzzy`>> query.
<<query-dsl-span-first-query,`span_first` query>>::
Accepts another span query whose matches must appear within the first N
positions of the field.
<<query-dsl-span-near-query,`span_near` query>>::
Accepts multiple span queries whose matches must be within the specified distance of each other, and possibly in the same order.
<<query-dsl-span-or-query,`span_or` query>>::
Combines multiple span queries -- returns documents which match any of the
specified queries.
<<query-dsl-span-not-query,`span_not` query>>::
Wraps another span query, and excludes any documents which match that query.
<<query-dsl-span-containing-query,`span_containing` query>>::
Accepts a list of span queries, but only returns those spans which also match a second span query.
<<query-dsl-span-within-query,`span_within` query>>:: <<query-dsl-span-within-query,`span_within` query>>::
The result from a single span query is returned as long is its span falls The result from a single span query is returned as long is its span falls
within the spans returned by a list of other span queries. within the spans returned by a list of other span queries.
<<query-dsl-span-field-masking-query,`field_masking_span` query>>::
Allows queries like `span-near` or `span-or` across different fields.
include::span-term-query.asciidoc[]
include::span-multi-term-query.asciidoc[]
include::span-first-query.asciidoc[]
include::span-near-query.asciidoc[]
include::span-or-query.asciidoc[]
include::span-not-query.asciidoc[]
include::span-containing-query.asciidoc[] include::span-containing-query.asciidoc[]
include::span-within-query.asciidoc[]
include::span-field-masking-query.asciidoc[] include::span-field-masking-query.asciidoc[]
include::span-first-query.asciidoc[]
include::span-multi-term-query.asciidoc[]
include::span-near-query.asciidoc[]
include::span-not-query.asciidoc[]
include::span-or-query.asciidoc[]
include::span-term-query.asciidoc[]
include::span-within-query.asciidoc[]

View File

@ -1,5 +1,8 @@
[[query-dsl-span-term-query]] [[query-dsl-span-term-query]]
=== Span Term Query === Span term query
++++
<titleabbrev>Span term</titleabbrev>
++++
Matches spans containing a term. The span term query maps to Lucene Matches spans containing a term. The span term query maps to Lucene
`SpanTermQuery`. Here is an example: `SpanTermQuery`. Here is an example:

View File

@ -1,5 +1,8 @@
[[query-dsl-span-within-query]] [[query-dsl-span-within-query]]
=== Span Within Query === Span within query
++++
<titleabbrev>Span within</titleabbrev>
++++
Returns matches which are enclosed inside another span query. The span within Returns matches which are enclosed inside another span query. The span within
query maps to Lucene `SpanWithinQuery`. Here is an example: query maps to Lucene `SpanWithinQuery`. Here is an example:

View File

@ -4,50 +4,44 @@
This group contains queries which do not fit into the other groups: This group contains queries which do not fit into the other groups:
<<query-dsl-mlt-query,`more_like_this` query>>::
This query finds documents which are similar to the specified text, document,
or collection of documents.
<<query-dsl-script-query,`script` query>>::
This query allows a script to act as a filter. Also see the
<<query-dsl-function-score-query,`function_score` query>>.
<<query-dsl-script-score-query,`script_score` query>>::
A query that allows to modify the score of a sub-query with a script.
<<query-dsl-percolate-query,`percolate` query>>::
This query finds queries that are stored as documents that match with
the specified document.
<<query-dsl-rank-feature-query,`rank_feature` query>>::
A query that computes scores based on the values of numeric features and is
able to efficiently skip non-competitive hits.
<<query-dsl-distance-feature-query,`distance_feature` query>>:: <<query-dsl-distance-feature-query,`distance_feature` query>>::
A query that computes scores based on the dynamically computed distances A query that computes scores based on the dynamically computed distances
between the origin and documents' date, date_nanos and geo_point fields. between the origin and documents' date, date_nanos and geo_point fields.
It is able to efficiently skip non-competitive hits. It is able to efficiently skip non-competitive hits.
<<query-dsl-wrapper-query,`wrapper` query>>:: <<query-dsl-mlt-query,`more_like_this` query>>::
This query finds documents which are similar to the specified text, document,
or collection of documents.
<<query-dsl-percolate-query,`percolate` query>>::
This query finds queries that are stored as documents that match with
the specified document.
<<query-dsl-rank-feature-query,`rank_feature` query>>::
A query that computes scores based on the values of numeric features and is
able to efficiently skip non-competitive hits.
<<query-dsl-script-query,`script` query>>::
This query allows a script to act as a filter. Also see the
<<query-dsl-function-score-query,`function_score` query>>.
<<query-dsl-script-score-query,`script_score` query>>::
A query that allows to modify the score of a sub-query with a script.
<<query-dsl-wrapper-query,`wrapper` query>>::
A query that accepts other queries as json or yaml string. A query that accepts other queries as json or yaml string.
include::distance-feature-query.asciidoc[]
include::mlt-query.asciidoc[] include::mlt-query.asciidoc[]
include::script-query.asciidoc[]
include::script-score-query.asciidoc[]
include::percolate-query.asciidoc[] include::percolate-query.asciidoc[]
include::rank-feature-query.asciidoc[] include::rank-feature-query.asciidoc[]
include::distance-feature-query.asciidoc[] include::script-query.asciidoc[]
include::wrapper-query.asciidoc[] include::script-score-query.asciidoc[]
include::wrapper-query.asciidoc[]

View File

@ -20,6 +20,27 @@ Term-level queries still normalize search terms for `keyword` fields with the
[[term-level-query-types]] [[term-level-query-types]]
=== Types of term-level queries === Types of term-level queries
<<query-dsl-exists-query,`exists` query>>::
Returns documents that contain any indexed value for a field.
<<query-dsl-fuzzy-query,`fuzzy` query>>::
Returns documents that contain terms similar to the search term. {es} measures
similarity, or fuzziness, using a
http://en.wikipedia.org/wiki/Levenshtein_distance[Levenshtein edit distance].
<<query-dsl-ids-query,`ids` query>>::
Returns documents based on their <<mapping-id-field, document IDs>>.
<<query-dsl-prefix-query,`prefix` query>>::
Returns documents that contain a specific prefix in a provided field.
<<query-dsl-range-query,`range` query>>::
Returns documents that contain terms within a provided range.
<<query-dsl-regexp-query,`regexp` query>>::
Returns documents that contain terms matching a
https://en.wikipedia.org/wiki/Regular_expression[regular expression].
<<query-dsl-term-query,`term` query>>:: <<query-dsl-term-query,`term` query>>::
Returns documents that contain an exact term in a provided field. Returns documents that contain an exact term in a provided field.
@ -31,34 +52,24 @@ Returns documents that contain a minimum number of exact terms in a provided
field. You can define the minimum number of matching terms using a field or field. You can define the minimum number of matching terms using a field or
script. script.
<<query-dsl-range-query,`range` query>>:: <<query-dsl-type-query,`type` query>>::
Returns documents that contain terms within a provided range. Returns documents of the specified type.
<<query-dsl-exists-query,`exists` query>>::
Returns documents that contain any indexed value for a field.
<<query-dsl-prefix-query,`prefix` query>>::
Returns documents that contain a specific prefix in a provided field.
<<query-dsl-wildcard-query,`wildcard` query>>:: <<query-dsl-wildcard-query,`wildcard` query>>::
Returns documents that contain terms matching a wildcard pattern. Returns documents that contain terms matching a wildcard pattern.
<<query-dsl-regexp-query,`regexp` query>>::
Returns documents that contain terms matching a
https://en.wikipedia.org/wiki/Regular_expression[regular expression].
<<query-dsl-fuzzy-query,`fuzzy` query>>:: include::exists-query.asciidoc[]
Returns documents that contain terms similar to the search term. {es} measures
similarity, or fuzziness, using a
http://en.wikipedia.org/wiki/Levenshtein_distance[Levenshtein edit distance].
<<query-dsl-type-query,`type` query>>:: include::fuzzy-query.asciidoc[]
Returns documents of the specified type. include::ids-query.asciidoc[]
<<query-dsl-ids-query,`ids` query>>:: include::prefix-query.asciidoc[]
Returns documents based on their <<mapping-id-field, document IDs>>.
include::range-query.asciidoc[]
include::regexp-query.asciidoc[]
include::term-query.asciidoc[] include::term-query.asciidoc[]
@ -66,18 +77,6 @@ include::terms-query.asciidoc[]
include::terms-set-query.asciidoc[] include::terms-set-query.asciidoc[]
include::range-query.asciidoc[]
include::exists-query.asciidoc[]
include::prefix-query.asciidoc[]
include::wildcard-query.asciidoc[]
include::regexp-query.asciidoc[]
include::fuzzy-query.asciidoc[]
include::type-query.asciidoc[] include::type-query.asciidoc[]
include::ids-query.asciidoc[] include::wildcard-query.asciidoc[]

View File

@ -1,5 +1,8 @@
[[query-dsl-term-query]] [[query-dsl-term-query]]
=== Term Query === Term query
++++
<titleabbrev>Term</titleabbrev>
++++
Returns documents that contain an *exact* term in a provided field. Returns documents that contain an *exact* term in a provided field.

View File

@ -1,5 +1,8 @@
[[query-dsl-terms-query]] [[query-dsl-terms-query]]
=== Terms Query === Terms query
++++
<titleabbrev>Terms</titleabbrev>
++++
Returns documents that contain one or more *exact* terms in a provided field. Returns documents that contain one or more *exact* terms in a provided field.

View File

@ -1,5 +1,8 @@
[[query-dsl-terms-set-query]] [[query-dsl-terms-set-query]]
=== Terms Set Query === Terms set query
++++
<titleabbrev>Terms set</titleabbrev>
++++
Returns documents that contain a minimum number of *exact* terms in a provided Returns documents that contain a minimum number of *exact* terms in a provided
field. field.

View File

@ -1,5 +1,9 @@
[[query-dsl-wildcard-query]] [[query-dsl-wildcard-query]]
=== Wildcard Query === Wildcard query
++++
<titleabbrev>Wildcard</titleabbrev>
++++
Returns documents that contain terms matching a wildcard pattern. Returns documents that contain terms matching a wildcard pattern.
A wildcard operator is a placeholder that matches one or more characters. For A wildcard operator is a placeholder that matches one or more characters. For

View File

@ -1,5 +1,8 @@
[[query-dsl-wrapper-query]] [[query-dsl-wrapper-query]]
=== Wrapper Query === Wrapper query
++++
<titleabbrev>Wrapper</titleabbrev>
++++
A query that accepts any other query as base64 encoded string. A query that accepts any other query as base64 encoded string.