Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion osbenchmark/workload/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,11 @@ def __init__(self, workloads, params, query_params, **kwargs):
self.space_type = params.get(self.PARAMS_NAME_SPACE_TYPE, "l2")

if self.radial_search_type:
self.radial_engine = params.get("radial_engine", "faiss")
index_body = params.get("target_index_body", "")
if "lucene" in index_body.lower():
self.radial_engine = "lucene"
else:
self.radial_engine = "faiss"

Comment on lines +1162 to 1167

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

are we just looking for the word lucene in whole index body and deciding?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.


if self.PARAMS_NAME_FILTER in params:
Expand Down
6 changes: 3 additions & 3 deletions tests/workload/params_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3497,7 +3497,7 @@ def test_radial_search_type_max_distance_faiss(self):
"data_set_path": data_set_path,
"k": k,
"radial_search_type": "max_distance",
"radial_engine": "faiss",
"target_index_body": "indices/faiss-index.json",
}
query_param_source = VectorSearchPartitionParamSource(
workload.Workload(name="unit-test"),
Expand Down Expand Up @@ -3547,7 +3547,7 @@ def test_radial_search_type_min_score_lucene(self):
"data_set_path": data_set_path,
"k": k,
"radial_search_type": "min_score",
"radial_engine": "lucene",
"target_index_body": "indices/lucene-index.json",
}
query_param_source = VectorSearchPartitionParamSource(
workload.Workload(name="unit-test"),
Expand Down Expand Up @@ -3584,7 +3584,7 @@ def test_radial_search_type_oversample_raises_error(self):
"data_set_path": data_set_path,
"k": 100,
"radial_search_type": "max_distance",
"radial_engine": "faiss",
"target_index_body": "indices/faiss-index.json",
"oversample_factor": 5.0,
}
with self.assertRaises(exceptions.InvalidSyntax):
Expand Down
Loading