Skip to content
Open
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
8 changes: 6 additions & 2 deletions osbenchmark/workload/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,7 @@ class VectorSearchPartitionParamSource(VectorDataSetPartitionParamSource):
PARAMS_NAME_REQUEST_PARAMS = "request-params"
PARAMS_NAME_SOURCE = "_source"
PARAMS_NAME_ALLOW_PARTIAL_RESULTS = "allow_partial_search_results"
PARAMS_NAME_EF_SEARCH = "hnsw_ef_search"

def __init__(self, workloads, params, query_params, **kwargs):
super().__init__(workloads, params, Context.QUERY, **kwargs)
Expand All @@ -1121,8 +1122,7 @@ def __init__(self, workloads, params, query_params, **kwargs):

self.filter_type = self.query_params.get(self.PARAMS_NAME_FILTER_TYPE)
self.filter_body = self.query_params.get(self.PARAMS_NAME_FILTER_BODY)


self.ef_search = self.query_params.get(self.PARAMS_NAME_EF_SEARCH)
if self.PARAMS_NAME_FILTER in params:
self.query_params.update({
self.PARAMS_NAME_FILTER: params.get(self.PARAMS_NAME_FILTER)
Expand Down Expand Up @@ -1226,6 +1226,10 @@ def _build_vector_search_query_body(self, vector, efficient_filter=None, filter_
"vector": vector,
"k": self.k,
}
if self.ef_search is not None:
query["method_parameters"] = {
"ef_search": self.ef_search
}
if efficient_filter:
query.update({
"filter": efficient_filter,
Expand Down
Loading