mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
Deprecate sorting in reindex (#49458)
Reindex sort never gave a guarantee about the order of documents being indexed into the destination, though it could give a sense of locality of source data. It prevents us from doing resilient reindex and other optimizations and it has therefore been deprecated. Related to #47567
This commit is contained in:
parent
54fe7f5728
commit
5b56a990b0
8 changed files with 95 additions and 48 deletions
|
@ -89,16 +89,6 @@ include-tagged::{doc-tests-file}[{api}-request-pipeline]
|
|||
--------------------------------------------------
|
||||
<1> set pipeline to `my_pipeline`
|
||||
|
||||
If you want a particular set of documents from the source index you’ll need to use sort. If possible, prefer a more
|
||||
selective query to maxDocs and sort.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request-sort]
|
||||
--------------------------------------------------
|
||||
<1> add descending sort to`field1`
|
||||
<2> add ascending sort to `field2`
|
||||
|
||||
+{request}+ also supports a `script` that modifies the document. It allows you to
|
||||
also change the document's metadata. The following example illustrates that.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue