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

[Feature]: The array attribute of the JSON data type should support intersection queries. #25162

Closed
1 task done
pofey opened this issue Jun 27, 2023 · 13 comments
Closed
1 task done
Assignees
Labels
good first issue Good for newcomers kind/feature Issues related to feature request from users

Comments

@pofey
Copy link

pofey commented Jun 27, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe.

json data:
{ "genre": ["comedy", "documentary"] }

I need to query data where the genre includes 'documentary' and 'plot' values, which is currently not supported. However, Pinecone can implement this with the $in keyword.

For example, queries with the following filters will match the vector:
{"genre": {"$in":["documentary","action"]}}

Describe the solution you'd like.

No response

Describe an alternate solution.

No response

Anything else? (Additional Context)

No response

@pofey pofey added the kind/feature Issues related to feature request from users label Jun 27, 2023
@jiaoew1991 jiaoew1991 added the good first issue Good for newcomers label Jun 27, 2023
@jiaoew1991
Copy link
Contributor

Hi @pofey Would you like to contribute this feature?

@pofey
Copy link
Author

pofey commented Jun 27, 2023

Hi @pofey Would you like to contribute this feature?

I'm sorry, I just stated my needs. Did I choose the wrong category?

@jiaoew1991
Copy link
Contributor

Hi @pofey Would you like to contribute this feature?

I'm sorry, I just stated my needs. Did I choose the wrong category?

Nope, feel free to open issues. we will put the feature in backlog until someone working on it.

@pofey
Copy link
Author

pofey commented Jun 27, 2023

Hi @pofey Would you like to contribute this feature?

I'm sorry, I just stated my needs. Did I choose the wrong category?

Nope, feel free to open issues. we will put the feature in backlog until someone working on it.

Thank you for your support. Could I know approximately how long it would take to complete this support?

@jiaoew1991
Copy link
Contributor

The support for the array type is already on the roadmap and is expected to be available in the 2.3.x series around August, If it doesn't go smoothly, it will go to a later version. Functions like intersection and difference will be supported first on the array type.

@xiaofan-luan
Copy link
Collaborator

I thought these on two different functionalities?
currently milvus already support json_contains functionalities, I guess it already support contains a list?
@xiaocai2333

@xiaocai2333
Copy link
Contributor

I thought these on two different functionalities? currently milvus already support json_contains functionalities, I guess it already support contains a list? @xiaocai2333

@xiaofan-luan @pofey We currently do not support lists, but this requirement can be converted to json_contains(genre, action) or json_contains(genre, documentary) . Moreover, this feature is only available in version 2.3.

@xiaocai2333
Copy link
Contributor

@xiaofan-luan Additionally, I think that to fulfill this requirement, it would be beneficial to introduce a new function called json_contains_any(array, list or element).

@xiaocai2333
Copy link
Contributor

/assign

@xiaofan-luan
Copy link
Collaborator

json_contains_any

Is there a reason json_contains can not cover it?

@xiaocai2333
Copy link
Contributor

json_contains_any

Is there a reason json_contains can not cover it?

It can achieve this functionality by combining json_contains with or. Currently, json_contains does not support elements that are lists, but if necessary, I will prioritize supporting it.

@xiaocai2333
Copy link
Contributor

trace by #25276

@jiaoew1991
Copy link
Contributor

track the feature in #25276, close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/feature Issues related to feature request from users
Projects
None yet
Development

No branches or pull requests

5 participants
@pofey @jiaoew1991 @xiaocai2333 @xiaofan-luan and others