[Backport 1.x] Use target_index_body for engine detection instead of radial_engine - #1101
Merged
rishabh6788 merged 1 commit intoAug 10, 2026
Conversation
…pensearch-project#1099) Signed-off-by: Wenxin Li <liwenxin@amazon.com> Co-authored-by: Wenxin Li <liwenxin@amazon.com> (cherry picked from commit d1aea17) Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
opensearch-ci-bot
requested review from
IanHoang,
OVI3D0,
VijayanB,
beaioun,
gkamat and
rishabh6788
as code owners
August 7, 2026 19:55
rishabh6788
approved these changes
Aug 7, 2026
VijayanB
reviewed
Aug 7, 2026
Comment on lines
+1162
to
1167
| index_body = params.get("target_index_body", "") | ||
| if "lucene" in index_body.lower(): | ||
| self.radial_engine = "lucene" | ||
| else: | ||
| self.radial_engine = "faiss" | ||
|
|
Member
There was a problem hiding this comment.
are we just looking for the word lucene in whole index body and deciding?
Contributor
There was a problem hiding this comment.
target_index_body is a file path (e.g. "indices/lucene-index.json"), not the file contents. We're just checking whether "lucene" appears in that short path string, which is reliable since all repo index body files follow this naming convention. We check the engine because the ground truth stores pre-computed thresholds per engine. Validated locally with both Faiss and Lucene benchmarks.
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.
Backport d1aea17 from #1099.