Skip to content

Conversation

@Mikep86
Copy link
Contributor

@Mikep86 Mikep86 commented Nov 14, 2025

Adds methods to QueryRewriteContext for registering and executing remote cluster async actions as part of the query rewrite process.

This functionality will be used by the semantic and intercepted (match/sparse_vector/knn) queries to get remote cluster inference results when performing CCS with ccs_minimize_roundtrips=false. It will also be used by the simplified linear/rrf retrievers to handle CCS. See the semantic search CCS POC for more context.

Both of these use cases will be implemented in follow-up PRs.

@Mikep86 Mikep86 requested review from a team, javanna and jimczi November 14, 2025 21:55
@Mikep86 Mikep86 added >non-issue :SearchOrg/Relevance Label for the Search (solution/org) Relevance team labels Nov 14, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-relevance (Team:Search - Relevance)

@elasticsearchmachine elasticsearchmachine added v9.3.0 Team:Search - Relevance The Search organization Search Relevance team labels Nov 14, 2025
Comment on lines +418 to +419
// TODO: Need to make a copy of remoteAsyncActions?
for (var entry : remoteAsyncActions.entrySet()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that asyncActions is copied to prevent concurrent modification. Do we need to do the same for remoteAsyncActions?


RemoteClusterClient remoteClient = client.getRemoteClusterClient(
clusterAlias,
client.threadPool().executor(SEARCH_COORDINATION), // TODO: Is this the right thread pool for remote async actions?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SEARCH_COORDINATION was my best guess, LMK if there's a more appropriate thread pool to use.

@Mikep86
Copy link
Contributor Author

Mikep86 commented Nov 14, 2025

@javanna

@jimczi asked me to add you to this PR to confirm that this will work with security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :SearchOrg/Relevance Label for the Search (solution/org) Relevance team Team:Search - Relevance The Search organization Search Relevance team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants