Skip to content

Add drop all option & bug fix - #89

Merged
Cheney Zhang (zc277584121) merged 3 commits into
langchain-ai:mainfrom
matanbt:add-missing-logic-bugfix
Jul 23, 2025
Merged

Add drop all option & bug fix#89
Cheney Zhang (zc277584121) merged 3 commits into
langchain-ai:mainfrom
matanbt:add-missing-logic-bugfix

Conversation

@matanbt

@matanbt Matan Ben-Tov (matanbt) commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

Hi!

First, thanks for maintaining this useful wrapper for Milvus :) Using it, I encountered a small issue, and a feature that I had to implement externally; so I thought I'd add them here.

  • search_by_metadata(): The function assumes the text field is requested by the function caller, although they might require metadata alone. Such requests currently result in an exception. Thus, to ensure text field is always returned on the database query, I suggest simply adding it, when missing.

  • drop(): Resetting the vectorstore by dropping all rows is very useful, and in fact currently enabled only on initialization (as part of __init__()). I suggest to decouple it into a method (drop(); feel free to offer other names), exposing it for external use.

Ensure text field is always returned on the query, as it's later used.
@zc277584121

Copy link
Copy Markdown
Collaborator

Matan Ben-Tov (@matanbt) thanks, it's a good optimization, but some lint check failed,please fix it according to the CONTRIBUTING.md guide. And btw, the async function asearch_by_metadata is the same structure as the sync one , can you change them in the same way

@matanbt

Copy link
Copy Markdown
Contributor Author
  • Fixed linting (now pass the local lint checks).
  • Added the required change to asearch_by_metadata.

@zc277584121
Cheney Zhang (zc277584121) merged commit 0903534 into langchain-ai:main Jul 23, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants