-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[ENH]: Support for $in and $nin metadata filters #1151
[ENH]: Support for $in and $nin metadata filters #1151
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
const results = await collection.query({ | ||
queryTexts: ["test"], | ||
nResults: 3, | ||
where: { "float_value" : { '$nin': [-2,0] }} |
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.
this says float, but they are ints?
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 picked up the examples from clients/js/test/data.ts
const METADATAS = [
{ test: "test1", float_value: -2 },
{ test: "test2", float_value: 0 },
{ test: "test3", float_value: 2 },
];
Any possible way to use this in python client? |
@gururise, this was originally implemented for Python and only then came to JS. Check this: https://docs.trychroma.com/usage-guide?lang=py#using-inclusion-operators-in-and-nin |
Refs: #1105
Description of changes
Summarize the changes made by this PR.
Test plan
How are these changes tested?
yarn test
for jsDocumentation Changes
TBD