From 3d4ca4b71a2081d1e7b4c65b610e63b1cc1c4afc Mon Sep 17 00:00:00 2001 From: Stefano Lottini Date: Wed, 5 Jun 2024 11:41:02 +0200 Subject: [PATCH] explicit projection when reading from Astra DB (#996) --- libs/superagent/app/vectorstores/astra_client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/superagent/app/vectorstores/astra_client.py b/libs/superagent/app/vectorstores/astra_client.py index 61d2763ad..641e01dd0 100644 --- a/libs/superagent/app/vectorstores/astra_client.py +++ b/libs/superagent/app/vectorstores/astra_client.py @@ -160,6 +160,7 @@ def _query(self, vector, top_k, filters=None): query = { "sort": {"$vector": vector}, "options": {"limit": top_k, "includeSimilarity": True}, + "projection": {"*": 1}, } if filters is not None: query["filter"] = filters