-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Feature]: Support "&" and "|" operator in boolean expression #18805
Comments
One point to be concerned: |
I can work on this but i need to where i have to make changes |
Hi, is this available to be assigned? I am a 4th year CS student at UBC in Vancouver |
/assign @Hirdey-1999 |
Hi All, I've assigned to you 2.
|
I am not able to find the milvus g4 file can you help me to navigate to the file for learning about milvus g4 |
Unser internal/parser/planparserv2 |
|
Hi, is this issue still open? what files do we need to make changes for this issue? Do we need to make changes in schema? |
this seems to be a simple issue, but there seems to be no volunteers on this yet. |
In which file do I need to make the change? I would like to work on this please. @xiaofan-luan |
you need to start with the plan.g4 file, understand the grammer of milvus filtering expression. after that. you need to implement a & and | operator in milvus core. Are you by chance faminiliar with cpp and parser? |
No I work on Java. But I am currently learning Go language to contribute to open source. I just know that parser uses lexer to create trees for executing an expression. |
this might be related to some execution logic. |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe.
Users may have a lot of bool attributes to do filtering.
He can create a bool field for each attribute:
bool_1, bool_2, bool_3, ....
He want to filter out the entities which bool_1=true, bool_2=ture, bool_3=true.
He can do search filtering by this expression:
search(expr="bool_1 && bool_2 && bool_3")
This approach is not efficient. It creates too many fields in a collection. And not easy to expand, when there is a new bool attribute, he need to create a new collection with the new field.
We can combine the bool attributes into an int64 value, with only one int64 field for the collection. Convert bool_1 as the first bit of the int64 value, bool_2 as the second bit, bool_3 as the third bit, etc. Then each int64 field can support up to 64 bool attributes.
And do search filtering in this way(assume the int64 field name is "flag"):
search(expr="flag & 8 == 0")
Describe the solution you'd like.
No response
Describe an alternate solution.
No response
Anything else? (Additional Context)
No response
The text was updated successfully, but these errors were encountered: