Skip to content

Commit 6ca401f

Browse files
committed
Restructure query-languages docs files for clarity (elastic#124797)
In a few previous PR's we restructured the ES|QL docs to make it possible to generate them dynamically. This PR just moves a few files around to make the query languages docs easier to work with, and a little more organized like the ES|QL docs. A bit part of this was setting up redirects to the new locations, so other repo's could correctly link to the elasticsearch docs.
1 parent e07f983 commit 6ca401f

File tree

188 files changed

+1023
-968
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+1023
-968
lines changed

docs/redirects.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
redirects:
2+
'reference/query-languages/query-dsl-intervals-query.md': 'reference/query-languages/query-dsl/query-dsl-intervals-query.md'
3+
'reference/query-languages/query-dsl-script-score-query.md': 'reference/query-languages/query-dsl/query-dsl-script-score-query.md'
4+
'reference/query-languages/query-dsl-range-query.md': 'reference/query-languages/query-dsl/query-dsl-range-query.md'
5+
'reference/query-languages/term-level-queries.md': 'reference/query-languages/query-dsl/term-level-queries.md'
6+
'reference/query-languages/query-dsl-term-query.md': 'reference/query-languages/query-dsl/query-dsl-term-query.md'
7+
'reference/query-languages/query-dsl-multi-match-query.md': 'reference/query-languages/query-dsl/query-dsl-multi-match-query.md'
8+
'reference/query-languages/query-dsl-query-string-query.md':
9+
to: 'reference/query-languages/query-dsl/query-dsl-query-string-query.md'
10+
anchors:
11+
'_boosting': 'boosting'
12+
'boosting': 'boosting'
13+
'query-string-syntax': 'query-string-syntax'
14+
'reference/query-languages/shape-queries.md': 'reference/query-languages/query-dsl/shape-queries.md'
15+
'reference/query-languages/geo-queries.md': 'reference/query-languages/query-dsl/geo-queries.md'
16+
'reference/query-languages/full-text-queries.md': 'reference/query-languages/query-dsl/full-text-queries.md'
17+
'reference/query-languages/compound-queries.md': 'reference/query-languages/query-dsl/compound-queries.md'
18+
'reference/query-languages/query-dsl-bool-query.md': 'reference/query-languages/query-dsl/query-dsl-bool-query.md'
19+
'reference/query-languages/query-dsl-match-query.md': 'reference/query-languages/query-dsl/query-dsl-match-query.md'
20+
'reference/query-languages/query-dsl-sparse-vector-query.md': 'reference/query-languages/query-dsl/query-dsl-sparse-vector-query.md'
21+
'reference/query-languages/regexp-syntax.md': 'reference/query-languages/query-dsl/regexp-syntax.md'
22+
'reference/query-languages/query-dsl-script-query.md': 'reference/query-languages/query-dsl/query-dsl-script-query.md'
23+
'reference/query-languages/eql-syntax.md': 'reference/query-languages/eql/eql-syntax.md'
24+
'reference/query-languages/query-dsl-terms-query.md': 'reference/query-languages/query-dsl/query-dsl-terms-query.md'
25+
'reference/query-languages/query-dsl-shape-query.md': 'reference/query-languages/query-dsl/query-dsl-shape-query.md'
26+
'reference/query-languages/query-dsl-geo-shape-query.md': 'reference/query-languages/query-dsl/query-dsl-geo-shape-query.md'
27+
'reference/query-languages/query-dsl-match-all-query.md': 'reference/query-languages/query-dsl/query-dsl-match-all-query.md'
28+
'reference/query-languages/query-dsl-exists-query.md': 'reference/query-languages/query-dsl/query-dsl-exists-query.md'
29+
'reference/query-languages/query-dsl-minimum-should-match.md': 'reference/query-languages/query-dsl/query-dsl-minimum-should-match.md'
30+
'reference/query-languages/query-dsl-rank-feature-query.md': 'reference/query-languages/query-dsl/query-dsl-rank-feature-query.md'
31+
'reference/query-languages/query-dsl-match-query-phrase.md': 'reference/query-languages/query-dsl/query-dsl-match-query-phrase.md'
32+
'reference/query-languages/query-dsl-constant-score-query.md': 'reference/query-languages/query-dsl/query-dsl-constant-score-query.md'
33+
'reference/query-languages/query-dsl-percolate-query.md': 'reference/query-languages/query-dsl/query-dsl-percolate-query.md'
34+
'reference/query-languages/joining-queries.md': 'reference/query-languages/query-dsl/joining-queries.md'
35+
'reference/query-languages/query-dsl-wildcard-query.md': 'reference/query-languages/query-dsl/query-dsl-wildcard-query.md'
36+
'reference/query-languages/query-dsl-prefix-query.md': 'reference/query-languages/query-dsl/query-dsl-prefix-query.md'
37+
'reference/query-languages/query-dsl-regexp-query.md': 'reference/query-languages/query-dsl/query-dsl-regexp-query.md'
38+
'reference/query-languages/query-dsl-fuzzy-query.md': 'reference/query-languages/query-dsl/query-dsl-fuzzy-query.md'
39+
'reference/query-languages/query-dsl-dis-max-query.md': 'reference/query-languages/query-dsl/query-dsl-dis-max-query.md'
40+
'reference/query-languages/query-dsl-geo-distance-query.md': 'reference/query-languages/query-dsl/query-dsl-geo-distance-query.md'
41+
'reference/query-languages/query-dsl-function-score-query.md': 'reference/query-languages/query-dsl/query-dsl-function-score-query.md'
42+
'reference/query-languages/query-dsl-knn-query.md': 'reference/query-languages/query-dsl/query-dsl-knn-query.md'
43+
'reference/query-languages/query-dsl-text-expansion-query.md': 'reference/query-languages/query-dsl/query-dsl-text-expansion-query.md'

docs/reference/data-analysis/aggregations/search-aggregations-bucket-daterange-aggregation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Response:
6464
```
6565

6666
::::{warning}
67-
If a format or date value is incomplete, the date range aggregation replaces any missing components with default values. See [Missing date components](/reference/query-languages/query-dsl-range-query.md#missing-date-components).
67+
If a format or date value is incomplete, the date range aggregation replaces any missing components with default values. See [Missing date components](/reference/query-languages/query-dsl/query-dsl-range-query.md#missing-date-components).
6868
::::
6969

7070

docs/reference/data-analysis/aggregations/search-aggregations-bucket-geohashgrid-aggregation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Response:
9393

9494
## High-precision requests [_high_precision_requests]
9595

96-
When requesting detailed buckets (typically for displaying a "zoomed in" map) a filter like [geo_bounding_box](/reference/query-languages/query-dsl-geo-bounding-box-query.md) should be applied to narrow the subject area otherwise potentially millions of buckets will be created and returned.
96+
When requesting detailed buckets (typically for displaying a "zoomed in" map) a filter like [geo_bounding_box](/reference/query-languages/query-dsl/query-dsl-geo-bounding-box-query.md) should be applied to narrow the subject area otherwise potentially millions of buckets will be created and returned.
9797

9898
$$$geohashgrid-aggregation-high-precision-example$$$
9999

@@ -191,7 +191,7 @@ var bbox = geohash.decode_bbox('u17');
191191

192192
## Requests with additional bounding box filtering [_requests_with_additional_bounding_box_filtering]
193193

194-
The `geohash_grid` aggregation supports an optional `bounds` parameter that restricts the cells considered to those that intersects the bounds provided. The `bounds` parameter accepts the bounding box in all the same [accepted formats](/reference/query-languages/query-dsl-geo-bounding-box-query.md#query-dsl-geo-bounding-box-query-accepted-formats) of the bounds specified in the Geo Bounding Box Query. This bounding box can be used with or without an additional `geo_bounding_box` query filtering the points prior to aggregating. It is an independent bounding box that can intersect with, be equal to, or be disjoint to any additional `geo_bounding_box` queries defined in the context of the aggregation.
194+
The `geohash_grid` aggregation supports an optional `bounds` parameter that restricts the cells considered to those that intersects the bounds provided. The `bounds` parameter accepts the bounding box in all the same [accepted formats](/reference/query-languages/query-dsl/query-dsl-geo-bounding-box-query.md#query-dsl-geo-bounding-box-query-accepted-formats) of the bounds specified in the Geo Bounding Box Query. This bounding box can be used with or without an additional `geo_bounding_box` query filtering the points prior to aggregating. It is an independent bounding box that can intersect with, be equal to, or be disjoint to any additional `geo_bounding_box` queries defined in the context of the aggregation.
195195

196196
$$$geohashgrid-aggregation-with-bounds$$$
197197

docs/reference/data-analysis/aggregations/search-aggregations-bucket-geohexgrid-aggregation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Response:
8888

8989
## High-precision requests [geohexgrid-high-precision]
9090

91-
When requesting detailed buckets (typically for displaying a "zoomed in" map), a filter like [geo_bounding_box](/reference/query-languages/query-dsl-geo-bounding-box-query.md) should be applied to narrow the subject area. Otherwise, potentially millions of buckets will be created and returned.
91+
When requesting detailed buckets (typically for displaying a "zoomed in" map), a filter like [geo_bounding_box](/reference/query-languages/query-dsl/query-dsl-geo-bounding-box-query.md) should be applied to narrow the subject area. Otherwise, potentially millions of buckets will be created and returned.
9292

9393
$$$geohexgrid-high-precision-ex$$$
9494

@@ -150,7 +150,7 @@ Response:
150150

151151
## Requests with additional bounding box filtering [geohexgrid-addtl-bounding-box-filtering]
152152

153-
The `geohex_grid` aggregation supports an optional `bounds` parameter that restricts the cells considered to those that intersect the provided bounds. The `bounds` parameter accepts the same [bounding box formats](/reference/query-languages/query-dsl-geo-bounding-box-query.md#query-dsl-geo-bounding-box-query-accepted-formats) as the geo-bounding box query. This bounding box can be used with or without an additional `geo_bounding_box` query for filtering the points prior to aggregating. It is an independent bounding box that can intersect with, be equal to, or be disjoint to any additional `geo_bounding_box` queries defined in the context of the aggregation.
153+
The `geohex_grid` aggregation supports an optional `bounds` parameter that restricts the cells considered to those that intersect the provided bounds. The `bounds` parameter accepts the same [bounding box formats](/reference/query-languages/query-dsl/query-dsl-geo-bounding-box-query.md#query-dsl-geo-bounding-box-query-accepted-formats) as the geo-bounding box query. This bounding box can be used with or without an additional `geo_bounding_box` query for filtering the points prior to aggregating. It is an independent bounding box that can intersect with, be equal to, or be disjoint to any additional `geo_bounding_box` queries defined in the context of the aggregation.
154154

155155
$$$geohexgrid-aggregation-with-bounds$$$
156156

@@ -218,7 +218,7 @@ precision
218218
: (Optional, integer) Integer zoom of the key used to define cells/buckets in the results. Defaults to `6`. Values outside of [`0`,`15`] will be rejected.
219219

220220
bounds
221-
: (Optional, object) Bounding box used to filter the geo-points or geo-shapes in each bucket. Accepts the same bounding box formats as the [geo-bounding box query](/reference/query-languages/query-dsl-geo-bounding-box-query.md#query-dsl-geo-bounding-box-query-accepted-formats).
221+
: (Optional, object) Bounding box used to filter the geo-points or geo-shapes in each bucket. Accepts the same bounding box formats as the [geo-bounding box query](/reference/query-languages/query-dsl/query-dsl-geo-bounding-box-query.md#query-dsl-geo-bounding-box-query-accepted-formats).
222222

223223
size
224224
: (Optional, integer) Maximum number of buckets to return. Defaults to 10,000. When results are trimmed, buckets are prioritized based on the volume of documents they contain.

docs/reference/data-analysis/aggregations/search-aggregations-bucket-geotilegrid-aggregation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Response:
9393

9494
## High-precision requests [geotilegrid-high-precision]
9595

96-
When requesting detailed buckets (typically for displaying a "zoomed in" map), a filter like [geo_bounding_box](/reference/query-languages/query-dsl-geo-bounding-box-query.md) should be applied to narrow the subject area. Otherwise, potentially millions of buckets will be created and returned.
96+
When requesting detailed buckets (typically for displaying a "zoomed in" map), a filter like [geo_bounding_box](/reference/query-languages/query-dsl/query-dsl-geo-bounding-box-query.md) should be applied to narrow the subject area. Otherwise, potentially millions of buckets will be created and returned.
9797

9898
$$$geotilegrid-high-precision-ex$$$
9999

@@ -155,7 +155,7 @@ Response:
155155

156156
## Requests with additional bounding box filtering [geotilegrid-addtl-bounding-box-filtering]
157157

158-
The `geotile_grid` aggregation supports an optional `bounds` parameter that restricts the cells considered to those that intersect the provided bounds. The `bounds` parameter accepts the same [bounding box formats](/reference/query-languages/query-dsl-geo-bounding-box-query.md#query-dsl-geo-bounding-box-query-accepted-formats) as the geo-bounding box query. This bounding box can be used with or without an additional `geo_bounding_box` query for filtering the points prior to aggregating. It is an independent bounding box that can intersect with, be equal to, or be disjoint to any additional `geo_bounding_box` queries defined in the context of the aggregation.
158+
The `geotile_grid` aggregation supports an optional `bounds` parameter that restricts the cells considered to those that intersect the provided bounds. The `bounds` parameter accepts the same [bounding box formats](/reference/query-languages/query-dsl/query-dsl-geo-bounding-box-query.md#query-dsl-geo-bounding-box-query-accepted-formats) as the geo-bounding box query. This bounding box can be used with or without an additional `geo_bounding_box` query for filtering the points prior to aggregating. It is an independent bounding box that can intersect with, be equal to, or be disjoint to any additional `geo_bounding_box` queries defined in the context of the aggregation.
159159

160160
$$$geotilegrid-aggregation-with-bounds$$$
161161

@@ -220,7 +220,7 @@ precision
220220
: (Optional, integer) Integer zoom of the key used to define cells/buckets in the results. Defaults to `7`. Values outside of [`0`,`29`] will be rejected.
221221

222222
bounds
223-
: (Optional, object) Bounding box used to filter the geo-points or geo-shapes in each bucket. Accepts the same bounding box formats as the [geo-bounding box query](/reference/query-languages/query-dsl-geo-bounding-box-query.md#query-dsl-geo-bounding-box-query-accepted-formats).
223+
: (Optional, object) Bounding box used to filter the geo-points or geo-shapes in each bucket. Accepts the same bounding box formats as the [geo-bounding box query](/reference/query-languages/query-dsl/query-dsl-geo-bounding-box-query.md#query-dsl-geo-bounding-box-query-accepted-formats).
224224

225225
size
226226
: (Optional, integer) Maximum number of buckets to return. Defaults to 10,000. When results are trimmed, buckets are prioritized based on the volume of documents they contain.

docs/reference/data-analysis/aggregations/search-aggregations-bucket-rare-terms-aggregation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ GET /_search
196196

197197
In the above example, buckets will be created for all the tags that starts with `swi`, except those starting with `electro` (so the tag `swing` will be aggregated but not `electro_swing`). The `include` regular expression will determine what values are "allowed" to be aggregated, while the `exclude` determines the values that should not be aggregated. When both are defined, the `exclude` has precedence, meaning, the `include` is evaluated first and only then the `exclude`.
198198

199-
The syntax is the same as [regexp queries](/reference/query-languages/regexp-syntax.md).
199+
The syntax is the same as [regexp queries](/reference/query-languages/query-dsl/regexp-syntax.md).
200200

201201

202202
### Filtering Values with exact values [_filtering_values_with_exact_values]

docs/reference/data-analysis/aggregations/search-aggregations-bucket-terms-aggregation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ GET /_search
448448

449449
In the above example, buckets will be created for all the tags that has the word `sport` in them, except those starting with `water_` (so the tag `water_sports` will not be aggregated). The `include` regular expression will determine what values are "allowed" to be aggregated, while the `exclude` determines the values that should not be aggregated. When both are defined, the `exclude` has precedence, meaning, the `include` is evaluated first and only then the `exclude`.
450450

451-
The syntax is the same as [regexp queries](/reference/query-languages/regexp-syntax.md).
451+
The syntax is the same as [regexp queries](/reference/query-languages/query-dsl/regexp-syntax.md).
452452

453453

454454
### Filtering Values with exact values [_filtering_values_with_exact_values_2]

docs/reference/data-analysis/aggregations/search-aggregations-metrics-top-hits-aggregation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The top_hits aggregation returns regular search hits, because of this many per h
2929

3030
* [Highlighting](/reference/elasticsearch/rest-apis/highlighting.md)
3131
* [Explain](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search)
32-
* [Named queries](/reference/query-languages/query-dsl-bool-query.md#named-queries)
32+
* [Named queries](/reference/query-languages/query-dsl/query-dsl-bool-query.md#named-queries)
3333
* [Search fields](/reference/elasticsearch/rest-apis/retrieve-selected-fields.md#search-fields-param)
3434
* [Source filtering](/reference/elasticsearch/rest-apis/retrieve-selected-fields.md#source-filtering)
3535
* [Stored fields](/reference/elasticsearch/rest-apis/retrieve-selected-fields.md#stored-fields)
@@ -43,7 +43,7 @@ If you **only** need `docvalue_fields`, `size`, and `sort` then [Top metrics](/r
4343
::::
4444

4545

46-
`top_hits` does not support the [`rescore`](/reference/elasticsearch/rest-apis/filter-search-results.md#rescore) parameter. Query rescoring applies only to search hits, not aggregation results. To change the scores used by aggregations, use a [`function_score`](/reference/query-languages/query-dsl-function-score-query.md) or [`script_score`](/reference/query-languages/query-dsl-script-score-query.md) query.
46+
`top_hits` does not support the [`rescore`](/reference/elasticsearch/rest-apis/filter-search-results.md#rescore) parameter. Query rescoring applies only to search hits, not aggregation results. To change the scores used by aggregations, use a [`function_score`](/reference/query-languages/query-dsl/query-dsl-function-score-query.md) or [`script_score`](/reference/query-languages/query-dsl/query-dsl-script-score-query.md) query.
4747

4848

4949
## Example [_example_6]

docs/reference/data-analysis/text-analysis/analysis-shingle-tokenfilter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Add shingles, or word [n-grams](https://en.wikipedia.org/wiki/N-gram), to a toke
1212
For example, many tokenizers convert `the lazy dog` to `[ the, lazy, dog ]`. You can use the `shingle` filter to add two-word shingles to this stream: `[ the, the lazy, lazy, lazy dog, dog ]`.
1313

1414
::::{tip}
15-
Shingles are often used to help speed up phrase queries, such as [`match_phrase`](/reference/query-languages/query-dsl-match-query-phrase.md). Rather than creating shingles using the `shingles` filter, we recommend you use the [`index-phrases`](/reference/elasticsearch/mapping-reference/index-phrases.md) mapping parameter on the appropriate [text](/reference/elasticsearch/mapping-reference/text.md) field instead.
15+
Shingles are often used to help speed up phrase queries, such as [`match_phrase`](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md). Rather than creating shingles using the `shingles` filter, we recommend you use the [`index-phrases`](/reference/elasticsearch/mapping-reference/index-phrases.md) mapping parameter on the appropriate [text](/reference/elasticsearch/mapping-reference/text.md) field instead.
1616
::::
1717

1818

docs/reference/data-analysis/text-analysis/analysis-simplepattern-tokenizer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The `simple_pattern` tokenizer uses a regular expression to capture matching tex
1111

1212
This tokenizer does not support splitting the input on a pattern match, unlike the [`pattern`](/reference/data-analysis/text-analysis/analysis-pattern-tokenizer.md) tokenizer. To split on pattern matches using the same restricted regular expression subset, see the [`simple_pattern_split`](/reference/data-analysis/text-analysis/analysis-simplepatternsplit-tokenizer.md) tokenizer.
1313

14-
This tokenizer uses [Lucene regular expressions](https://lucene.apache.org/core/10_0_0/core/org/apache/lucene/util/automaton/RegExp.md). For an explanation of the supported features and syntax, see [Regular Expression Syntax](/reference/query-languages/regexp-syntax.md).
14+
This tokenizer uses [Lucene regular expressions](https://lucene.apache.org/core/10_0_0/core/org/apache/lucene/util/automaton/RegExp.html). For an explanation of the supported features and syntax, see [Regular Expression Syntax](/reference/query-languages/query-dsl/regexp-syntax.md).
1515

1616
The default pattern is the empty string, which produces no terms. This tokenizer should always be configured with a non-default pattern.
1717

0 commit comments

Comments
 (0)