Support using the semantic query across multiple inference IDs#133675
Merged
Mikep86 merged 21 commits intoelastic:mainfrom Sep 3, 2025
Merged
Support using the semantic query across multiple inference IDs#133675Mikep86 merged 21 commits intoelastic:mainfrom
Mikep86 merged 21 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/search-relevance (Team:Search - Relevance) |
Collaborator
|
Hi @Mikep86, I've created a changelog YAML for you. |
Mikep86
commented
Aug 27, 2025
.../inference/src/main/java/org/elasticsearch/xpack/inference/queries/SemanticQueryBuilder.java
Show resolved
Hide resolved
kderusso
reviewed
Aug 27, 2025
Member
kderusso
left a comment
There was a problem hiding this comment.
Changes look good to me!
It looks like there are some failing tests that should be cleaned up, and I'd like to see a followup PR that removes the artificial restriction in interceptors.
Otherwise, nice work! 🙌
...erence/src/main/java/org/elasticsearch/xpack/inference/queries/InferenceResultsProvider.java
Outdated
Show resolved
Hide resolved
...nce/src/main/java/org/elasticsearch/xpack/inference/queries/MapInferenceResultsProvider.java
Outdated
Show resolved
Hide resolved
.../inference/src/main/java/org/elasticsearch/xpack/inference/queries/SemanticQueryBuilder.java
Show resolved
Hide resolved
.../inference/src/main/java/org/elasticsearch/xpack/inference/queries/SemanticQueryBuilder.java
Show resolved
Hide resolved
.../src/main/java/org/elasticsearch/xpack/inference/queries/SingleInferenceResultsProvider.java
Outdated
Show resolved
Hide resolved
jimczi
reviewed
Aug 27, 2025
...erence/src/main/java/org/elasticsearch/xpack/inference/queries/InferenceResultsProvider.java
Outdated
Show resolved
Hide resolved
ioanatia
reviewed
Aug 28, 2025
.../inference/src/main/java/org/elasticsearch/xpack/inference/queries/SemanticQueryBuilder.java
Show resolved
Hide resolved
Mikep86
commented
Aug 28, 2025
...esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/SemanticMatchTestCase.java
Show resolved
Hide resolved
ioanatia
approved these changes
Aug 29, 2025
Contributor
Author
|
@elasticmachine Update branch |
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine update branch |
Collaborator
|
merge conflict between base and head |
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 PR updates the
semanticquery to support querying multiple inference IDs, which can happen when queryingsemantic_textfields across multiple indices. This is enabled by transferring inference results between coordinating and data nodes using a map keyed on inference ID.This change also benefits
matchquery support since such queries are rewritten tosemanticqueries when asemantic_textfield is targeted. With this change, it should be possible to issue a multi-indexmatchquery againstsemantic_textfields that use multiple inference IDs.