Skip to content

Commit

Permalink
community[patch]: Return PK in similarity search Document (#17561)
Browse files Browse the repository at this point in the history
Issue: #17390

Co-authored-by: hasan <[email protected]>
  • Loading branch information
hasansustcse13 and hasan authored Feb 22, 2024
1 parent 1ec8199 commit 7248e98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/community/langchain_community/vectorstores/milvus.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,8 @@ def similarity_search_with_score_by_vector(
if param is None:
param = self.search_params

# Determine result metadata fields.
output_fields = [x for x in self.fields if x != self._primary_field]
# Determine result metadata fields with PK.
output_fields = self.fields[:]
output_fields.remove(self._vector_field)

# Perform the search.
Expand Down

0 comments on commit 7248e98

Please sign in to comment.