Add support for project routing in reindex requests#142240
Merged
alexey-ivanov-es merged 10 commits intoelastic:mainfrom Feb 27, 2026
Merged
Add support for project routing in reindex requests#142240alexey-ivanov-es merged 10 commits intoelastic:mainfrom
alexey-ivanov-es merged 10 commits intoelastic:mainfrom
Conversation
This change adds support for flat-world index resolution to source.index field of reindex request if cross-project search is enabled
This change enables specifying `project_routing` in reindex requests. If cross-project search is disabled, having project_routing specified will fail validation of the request.
Collaborator
|
Pinging @elastic/es-distributed (Team:Distributed) |
| IndicesOptions indicesOptions = request.getSearchRequest().indicesOptions(); | ||
| if (indicesOptions.resolveCrossProjectIndexExpression()) { | ||
| try { | ||
| request.getSearchRequest() |
Contributor
Author
There was a problem hiding this comment.
This was moved to ReindexValidator.skipRemoteIndexNames
ywangd
approved these changes
Feb 25, 2026
Member
ywangd
left a comment
There was a problem hiding this comment.
LGTM
I have some minor comments and I'd appreciate if you could address them. Thanks!
modules/reindex/src/main/java/org/elasticsearch/reindex/ReindexValidator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/reindex/ReindexRequest.java
Outdated
Show resolved
Hide resolved
Comment on lines
+173
to
+175
| if (searchRequest.getProjectRouting() != null) { | ||
| entity.field("project_routing", searchRequest.getProjectRouting()); | ||
| } |
Member
There was a problem hiding this comment.
Can we have a test for this to ensure project_routing is propagate to the request targeting a HTTP remote?
Contributor
Author
There was a problem hiding this comment.
Added a unit-test, more tests will be a follow-up PR
szybia
added a commit
to szybia/elasticsearch
that referenced
this pull request
Feb 27, 2026
…cations * upstream/main: Warn on API key version mismatch (elastic#143127) Fixed wrong malformed value ordering in synthetic source tests (elastic#143187) [ML] Fix: required_native_memory_bytes Calculated with Wrong Allocation Count (elastic#143077) Add configureBenchmarkLogging calls across the various benchmarks (elastic#143185) Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:k8s-timeseries-avg-over-time.Avg_over_time_aggregate_metric_double_implicit_casting} elastic#143292 Give system role permission to invoke shard refresh (elastic#143190) Mute testSyntheticSourceWithTranslogSnapshot (elastic#143260) Adds ResumeInfo Tests (elastic#142769) Use a static method to configure benchmark logging (elastic#143056) add connectors release notes (elastic#142884) Add CI triage guidance for AI agents (elastic#142994) ESQL: Data sources: ZSTD, BZIP2 (elastic#143228) [ES|QL] Channels issue when an agg is called with the same field (elastic#142180) (elastic#142269) Add support for project routing in reindex requests (elastic#142240)
tballison
pushed a commit
to tballison/elasticsearch
that referenced
this pull request
Mar 3, 2026
This change adds support for flat-world index resolution to source.index field of reindex request if cross-project search is enabled
alexey-ivanov-es
added a commit
to elastic/elasticsearch-specification
that referenced
this pull request
Mar 10, 2026
project_routing parameter was added to reindex requests in elastic/elasticsearch#142240, this change updates the spec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change enables specifying
project_routingin reindex requests. If cross-project search is disabled, having project_routing specified will fail validation of the request.