diff --git a/embedchain/vectordb/opensearch.py b/embedchain/vectordb/opensearch.py index e9a4baf110..e21bf2209d 100644 --- a/embedchain/vectordb/opensearch.py +++ b/embedchain/vectordb/opensearch.py @@ -98,7 +98,7 @@ def get( if where: for key, value in where.items(): - query["bool"]["must"].append({"term": {f"metadata.{key}.keyword": value}}) + query["query"]["bool"]["must"].append({"term": {f"metadata.{key}.keyword": value}}) # OpenSearch syntax is different from Elasticsearch response = self.client.search(index=self._get_index(), body=query, _source=True, size=limit)