Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
270cc69
Restructure query-languages for clarity
craigtaverner Mar 13, 2025
e17976a
Merge branch 'main' into docs_restructure_query_languages
craigtaverner Mar 13, 2025
d82e3e8
Update ESQL docs with new query-dsl locations
craigtaverner Mar 14, 2025
d854d78
Merge remote-tracking branch 'origin/main' into docs_restructure_quer…
craigtaverner Mar 14, 2025
7dbd9d9
Add redirects for incoming links to the new locations
craigtaverner Mar 14, 2025
95cc373
Remove duplicated redirects
craigtaverner Mar 14, 2025
dd6b29e
Fix eql redirect
craigtaverner Mar 14, 2025
7263ee2
Change anchor name from _boosting to boosting
craigtaverner Mar 14, 2025
a17eaa2
Merge branch 'main' into docs_restructure_query_languages
craigtaverner Mar 14, 2025
26bfd13
Merge branch 'main' into docs_restructure_query_languages
craigtaverner Mar 14, 2025
1d081ab
Fix some old links
craigtaverner Mar 14, 2025
520dc71
Merge branch 'main' into docs_restructure_query_languages
craigtaverner Mar 14, 2025
f5f29ba
Merge branch 'docs_restructure_query_languages' of github.com:craigta…
craigtaverner Mar 14, 2025
c33ddeb
Add more anchors to query-string-query to try get around errors
craigtaverner Mar 15, 2025
18cfa31
Merge remote-tracking branch 'origin/main' into docs_restructure_quer…
craigtaverner Mar 15, 2025
d7385b8
Fix remaining query-dsl link
craigtaverner Mar 17, 2025
94a1acc
Fix corrupted link
craigtaverner Mar 17, 2025
d28cb3c
Merge remote-tracking branch 'origin/main' into docs_restructure_quer…
craigtaverner Mar 17, 2025
a6c0ba0
Merge branch 'main' into docs_restructure_query_languages
craigtaverner Mar 17, 2025
35a1f94
One file was statically written and needed editing
craigtaverner Mar 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/redirects.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
redirects:
'reference/query-languages/query-dsl-intervals-query.md': 'reference/query-languages/query-dsl/query-dsl-intervals-query.md'
'reference/query-languages/query-dsl-script-score-query.md': 'reference/query-languages/query-dsl/query-dsl-script-score-query.md'
'reference/query-languages/query-dsl-range-query.md': 'reference/query-languages/query-dsl/query-dsl-range-query.md'
'reference/query-languages/term-level-queries.md': 'reference/query-languages/query-dsl/term-level-queries.md'
'reference/query-languages/query-dsl-term-query.md': 'reference/query-languages/query-dsl/query-dsl-term-query.md'
'reference/query-languages/query-dsl-multi-match-query.md': 'reference/query-languages/query-dsl/query-dsl-multi-match-query.md'
'reference/query-languages/query-dsl-query-string-query.md':
to: 'reference/query-languages/query-dsl/query-dsl-query-string-query.md'
anchors:
'_boosting': 'boosting'
'boosting': 'boosting'
'query-string-syntax': 'query-string-syntax'
'reference/query-languages/shape-queries.md': 'reference/query-languages/query-dsl/shape-queries.md'
'reference/query-languages/geo-queries.md': 'reference/query-languages/query-dsl/geo-queries.md'
'reference/query-languages/full-text-queries.md': 'reference/query-languages/query-dsl/full-text-queries.md'
'reference/query-languages/compound-queries.md': 'reference/query-languages/query-dsl/compound-queries.md'
'reference/query-languages/query-dsl-bool-query.md': 'reference/query-languages/query-dsl/query-dsl-bool-query.md'
'reference/query-languages/query-dsl-match-query.md': 'reference/query-languages/query-dsl/query-dsl-match-query.md'
'reference/query-languages/query-dsl-sparse-vector-query.md': 'reference/query-languages/query-dsl/query-dsl-sparse-vector-query.md'
'reference/query-languages/regexp-syntax.md': 'reference/query-languages/query-dsl/regexp-syntax.md'
'reference/query-languages/query-dsl-script-query.md': 'reference/query-languages/query-dsl/query-dsl-script-query.md'
'reference/query-languages/eql-syntax.md': 'reference/query-languages/eql/eql-syntax.md'
'reference/query-languages/query-dsl-terms-query.md': 'reference/query-languages/query-dsl/query-dsl-terms-query.md'
'reference/query-languages/query-dsl-shape-query.md': 'reference/query-languages/query-dsl/query-dsl-shape-query.md'
'reference/query-languages/query-dsl-geo-shape-query.md': 'reference/query-languages/query-dsl/query-dsl-geo-shape-query.md'
'reference/query-languages/query-dsl-match-all-query.md': 'reference/query-languages/query-dsl/query-dsl-match-all-query.md'
'reference/query-languages/query-dsl-exists-query.md': 'reference/query-languages/query-dsl/query-dsl-exists-query.md'
'reference/query-languages/query-dsl-minimum-should-match.md': 'reference/query-languages/query-dsl/query-dsl-minimum-should-match.md'
'reference/query-languages/query-dsl-rank-feature-query.md': 'reference/query-languages/query-dsl/query-dsl-rank-feature-query.md'
'reference/query-languages/query-dsl-match-query-phrase.md': 'reference/query-languages/query-dsl/query-dsl-match-query-phrase.md'
'reference/query-languages/query-dsl-constant-score-query.md': 'reference/query-languages/query-dsl/query-dsl-constant-score-query.md'
'reference/query-languages/query-dsl-percolate-query.md': 'reference/query-languages/query-dsl/query-dsl-percolate-query.md'
'reference/query-languages/joining-queries.md': 'reference/query-languages/query-dsl/joining-queries.md'
'reference/query-languages/query-dsl-wildcard-query.md': 'reference/query-languages/query-dsl/query-dsl-wildcard-query.md'
'reference/query-languages/query-dsl-prefix-query.md': 'reference/query-languages/query-dsl/query-dsl-prefix-query.md'
'reference/query-languages/query-dsl-regexp-query.md': 'reference/query-languages/query-dsl/query-dsl-regexp-query.md'
'reference/query-languages/query-dsl-fuzzy-query.md': 'reference/query-languages/query-dsl/query-dsl-fuzzy-query.md'
'reference/query-languages/query-dsl-dis-max-query.md': 'reference/query-languages/query-dsl/query-dsl-dis-max-query.md'
'reference/query-languages/query-dsl-geo-distance-query.md': 'reference/query-languages/query-dsl/query-dsl-geo-distance-query.md'
'reference/query-languages/query-dsl-function-score-query.md': 'reference/query-languages/query-dsl/query-dsl-function-score-query.md'
'reference/query-languages/query-dsl-knn-query.md': 'reference/query-languages/query-dsl/query-dsl-knn-query.md'
'reference/query-languages/query-dsl-text-expansion-query.md': 'reference/query-languages/query-dsl/query-dsl-text-expansion-query.md'
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Response:
```

::::{warning}
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).
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).
::::


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Response:

## High-precision requests [_high_precision_requests]

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.
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.

$$$geohashgrid-aggregation-high-precision-example$$$

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

## Requests with additional bounding box filtering [_requests_with_additional_bounding_box_filtering]

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.
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.

$$$geohashgrid-aggregation-with-bounds$$$

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Response:

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

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.
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.

$$$geohexgrid-high-precision-ex$$$

Expand Down Expand Up @@ -150,7 +150,7 @@ Response:

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

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.
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.

$$$geohexgrid-aggregation-with-bounds$$$

Expand Down Expand Up @@ -218,7 +218,7 @@ precision
: (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.

bounds
: (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).
: (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).

size
: (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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Response:

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

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.
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.

$$$geotilegrid-high-precision-ex$$$

Expand Down Expand Up @@ -155,7 +155,7 @@ Response:

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

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.
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.

$$$geotilegrid-aggregation-with-bounds$$$

Expand Down Expand Up @@ -220,7 +220,7 @@ precision
: (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.

bounds
: (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).
: (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).

size
: (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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ GET /_search

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`.

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


### Filtering Values with exact values [_filtering_values_with_exact_values]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ GET /_search

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`.

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


### Filtering Values with exact values [_filtering_values_with_exact_values_2]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The top_hits aggregation returns regular search hits, because of this many per h

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


`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.
`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.


## Example [_example_6]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Add shingles, or word [n-grams](https://en.wikipedia.org/wiki/N-gram), to a toke
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 ]`.

::::{tip}
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.
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.
::::


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The `simple_pattern` tokenizer uses a regular expression to capture matching tex

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.

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/regexp-syntax.md).
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).

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

Expand Down
Loading