You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ElasticVectorSearch currently assigns a uuid as identifier while indexing documents.
This is not idempotent: if we run the code twice duplicates are created.
Also it would be beneficial to be able to insert new docs, update existing ones and ignore unchanged.
Suggestion:
I propose to check first if _id or id is present in metadata before setting it to a UUID.
The text was updated successfully, but these errors were encountered:
Hi, @lemig! I'm Dosu, and I'm here to help the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.
From what I understand, you raised an issue about allowing ElasticVectorSearch#add_texts to set the _ids explicitly instead of assigning a UUID as the identifier. This would prevent duplicates and allow for inserting new documents, updating existing ones, and ignoring unchanged ones. There has been a comment by you suggesting to pass ids: Optional[List[str]] = None, as suggested by @dev2049 in issue #5190.
Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.
Thank you for your contribution to the LangChain repository!
dosubotbot
added
the
stale
Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
label
Sep 3, 2023
Issue you'd like to raise.
ElasticVectorSearch currently assigns a uuid as identifier while indexing documents.
This is not idempotent: if we run the code twice duplicates are created.
Also it would be beneficial to be able to insert new docs, update existing ones and ignore unchanged.
Suggestion:
I propose to check first if _id or id is present in metadata before setting it to a UUID.
The text was updated successfully, but these errors were encountered: