Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
`model_text`
: (Required, string) The query text you want to use for search.

`pruning_config` {applies_to}`stack: preview` {applies_to}`serverless: preview`
`pruning_config`
: (Optional, object) Optional pruning configuration. If enabled, this will omit non-significant tokens from the query in order to improve query performance. Default: Disabled.

Check notice on line 60 in docs/reference/query-languages/query-dsl/query-dsl-text-expansion-query.md

View workflow job for this annotation

GitHub Actions / docs-preview / vale

Elastic.WordChoice: Consider using 'deactivated, deselected, hidden, turned off, unavailable' instead of 'Disabled', unless the term is in the UI.

Check notice on line 60 in docs/reference/query-languages/query-dsl/query-dsl-text-expansion-query.md

View workflow job for this annotation

GitHub Actions / docs-preview / vale

Elastic.Wordiness: Consider using 'to' instead of 'in order to'.

Parameters for `<pruning_config>` are:

Expand Down Expand Up @@ -194,12 +194,9 @@


## Example ELSER query with pruning configuration and rescore [text-expansion-query-with-pruning-config-and-rescore-example]
```{applies_to}
stack: preview
serverless: preview
```


The following is an extension to the previous example that adds a pruning configuration to the `text_expansion` query. The pruning configuration identifies non-significant tokens to prune from the query in order to improve query performance.

Check notice on line 199 in docs/reference/query-languages/query-dsl/query-dsl-text-expansion-query.md

View workflow job for this annotation

GitHub Actions / docs-preview / vale

Elastic.Wordiness: Consider using 'to' instead of 'in order to'.

Token pruning happens at the shard level. While this should result in the same tokens being labeled as insignificant across shards, this is not guaranteed based on the composition of each shard. Therefore, if you are running `text_expansion` with a `pruning_config` on a multi-shard index, we strongly recommend adding a [Rescore filtered search results](/reference/elasticsearch/rest-apis/rescore-search-results.md#rescore) function with the tokens that were originally pruned from the query. This will help mitigate any shard-level inconsistency with pruned tokens and provide better relevance overall.

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/query-languages/querydsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
---

# QueryDSL [query-dsl]
# Query DSL [query-dsl]

:::{note}
Refer to the [Query DSL overview](docs-content://explore-analyze/query-filter/languages/querydsl.md) in the **Explore and analyze** section for overview and conceptual information about Query DSL.
Expand Down
Loading