community[patch]: Return PK in similarity search Document (#17561)

Issue: #17390

Co-authored-by: hasan <hasan@m2sys.com>
This commit is contained in:
Hasan 2024-02-22 07:03:50 +06:00 committed by GitHub
parent 1ec8199c8e
commit 7248e98b9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -739,8 +739,8 @@ class Milvus(VectorStore):
if param is None: if param is None:
param = self.search_params param = self.search_params
# Determine result metadata fields. # Determine result metadata fields with PK.
output_fields = [x for x in self.fields if x != self._primary_field] output_fields = self.fields[:]
output_fields.remove(self._vector_field) output_fields.remove(self._vector_field)
# Perform the search. # Perform the search.