Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into es-117596-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ywangd committed Nov 28, 2024
2 parents 20fa1fd + 2895f1e commit 15e0fbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/changelog/117606.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 117606
summary: Remove deprecated sort from reindex operation within dataframe analytics procedure
area: Machine Learning
type: enhancement
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@
import org.elasticsearch.core.Nullable;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.index.mapper.SeqNoFieldMapper;
import org.elasticsearch.index.reindex.BulkByScrollResponse;
import org.elasticsearch.index.reindex.BulkByScrollTask;
import org.elasticsearch.index.reindex.ReindexAction;
import org.elasticsearch.index.reindex.ReindexRequest;
import org.elasticsearch.script.Script;
import org.elasticsearch.search.sort.SortOrder;
import org.elasticsearch.tasks.Task;
import org.elasticsearch.tasks.TaskCancelledException;
import org.elasticsearch.tasks.TaskId;
Expand Down Expand Up @@ -147,7 +145,6 @@ protected void doExecute(ActionListener<StepResponse> listener) {
reindexRequest.setSourceQuery(config.getSource().getParsedQuery());
reindexRequest.getSearchRequest().allowPartialSearchResults(false);
reindexRequest.getSearchRequest().source().fetchSource(config.getSource().getSourceFiltering());
reindexRequest.getSearchRequest().source().sort(SeqNoFieldMapper.NAME, SortOrder.ASC);
reindexRequest.setDestIndex(config.getDest().getIndex());

// We explicitly set slices to 1 as we cannot parallelize in order to have the incremental id
Expand Down

0 comments on commit 15e0fbc

Please sign in to comment.