Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community[patch]: ElasticVectorSearch - fix error when no bulk operations #4857

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

telekosmos
Copy link
Contributor

Fixes bug in discussion # (discussion)

Description is in the attached issue/discussion. Basically, it was observed on incremental cleanup when calling the index(...) function a crash when trying to delete an empty list of elements. The deletion in Elastic is done by a POST _bulk request, which expects a non-emtpy list of operations. When there is no elements to delete, the list of operations is empty, hence the error. Easy to replicate straight in the Elastic Console (i.e. http://localhost:5601/app/dev_tools#/console) by writing just POST _bulk.

Copy link

vercel bot commented Mar 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 22, 2024 9:05am
langchainjs-docs ✅ Ready (Inspect) Visit Preview Mar 22, 2024 9:05am

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. auto:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Mar 22, 2024
@jacoblee93 jacoblee93 changed the title community: ElasticVectorSearch - fix error when no bulk operations community[patch]: ElasticVectorSearch - fix error when no bulk operations Mar 24, 2024
@jacoblee93
Copy link
Collaborator

Makes sense. Thank you!

@jacoblee93 jacoblee93 merged commit 5ed3dea into langchain-ai:main Mar 24, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants