From 00cac111fc6d71c97caf838b6483cf573279d959 Mon Sep 17 00:00:00 2001 From: dodo <131419135+certified-dodo@users.noreply.github.com> Date: Thu, 22 Feb 2024 10:59:11 -0800 Subject: [PATCH] fix: mongodb mmr search error ref: https://github.com/langchain-ai/langchain/issues/17963 --- libs/community/langchain_community/vectorstores/mongodb_atlas.py | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/community/langchain_community/vectorstores/mongodb_atlas.py b/libs/community/langchain_community/vectorstores/mongodb_atlas.py index 2e18f4280fa8b..379510bb625bd 100644 --- a/libs/community/langchain_community/vectorstores/mongodb_atlas.py +++ b/libs/community/langchain_community/vectorstores/mongodb_atlas.py @@ -209,7 +209,6 @@ def _similarity_search_with_score( for res in cursor: text = res.pop(self._text_key) score = res.pop("score") - del res[self._embedding_key] docs.append((Document(page_content=text, metadata=res), score)) return docs