diff --git a/libs/community/langchain_community/vectorstores/documentdb.py b/libs/community/langchain_community/vectorstores/documentdb.py index d56f1a57129..730c517a157 100644 --- a/libs/community/langchain_community/vectorstores/documentdb.py +++ b/libs/community/langchain_community/vectorstores/documentdb.py @@ -328,8 +328,8 @@ class DocumentDBVectorSearch(VectorStore): A list of documents closest to the query vector """ pipeline: List[dict[str, Any]] = [ + {"$match": filter}, { - "$match": filter, "$search": { "vectorSearch": { "vector": embeddings, @@ -339,7 +339,7 @@ class DocumentDBVectorSearch(VectorStore): "efSearch": ef_search, } }, - } + }, ] cursor = self._collection.aggregate(pipeline)