Skip to content
Discussion options

You must be logged in to vote

Since similarity search returns only documents and documents do not include their id, there is currently no way to get the id when doing similarity search. If you insert with a custom id, you could also set that as an id-field in the metadata and retrieve it that way. Otherwise I'm afraid there is currently no other way except overwriting the PGVectorStore to include the id in the return. There's been some discussion about adding the id to the document interface and @jacoblee93 has mentioned that a new type of vectorstore/indexing integration is under works or at least being considered.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Exlau
Comment options

Answer selected by Exlau
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants