-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: metadata filtering #12
Conversation
lib/pinecone.ex
Outdated
@@ -306,6 +306,34 @@ defmodule Pinecone do | |||
delete({:vectors, "#{name}-#{project_name}"}, "vectors/delete", opts[:config], params: params) | |||
end | |||
|
|||
@doc """ | |||
Deletes all vectors from the given Pinecone index that match the given metadata filter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to not have this method be a variant of delete
with a :filter
keyword?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not a great reason: the docs say the ids
, deleteAll
, and filter
params are mutually exclusive, so I wanted to avoid making an interface that appears to accept combinations of inputs that are in fact inconsistent or invalid. I guess it wouldn't make it too confusing to have it be a part of delete_all_vectors/2
though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made that change
@grossvogel Thanks for the contributions. I don't plan to maintain this library long term as I no longer have a use for it. If you want to take up the sword I can transfer the repository to you! |
@seanmor5 Thanks you for the library, and all the other cool stuff you've been doing in the ecosystem! I'll get back to you on the long-term maintenance question... we're still experimenting with Pinecone at this stage |
Connects to #6
query/3
to take a:filter
key, validate that it's a map, and pass it through to the API call to execute a filtered queryadelete_by_filter/3
:filter
opt todelete_all_vectors/2
to delete all vectors matching the provided filterAgain, I'm happy to adjust how this is done to fit your vision for the library. Thanks!