diff --git a/engine/clients/opensearch/search.py b/engine/clients/opensearch/search.py index a3e36058..fc7b5cbf 100644 --- a/engine/clients/opensearch/search.py +++ b/engine/clients/opensearch/search.py @@ -59,12 +59,7 @@ def search_one(cls, query: Query, top: int) -> List[Tuple[int, float]]: meta_conditions = cls.parser.parse(query.meta_conditions) if meta_conditions: - opensearch_query = { - "bool": { - "must": [opensearch_query], - "filter": meta_conditions, - } - } + opensearch_query["knn"]["vector"]["filter"] = meta_conditions res = cls.client.search( index=OPENSEARCH_INDEX,