-
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]: Distinct field values #25343
Comments
is there a specific use case for the distinct clause? |
is it in search or only in query? |
Is there any plans for this? My use case would be to present user with a list of available values which can be used for filtering in future queries. Without this I have to manage a list of distinct values myself elsewhere. |
can you describe you data model and the specific use case so I can give more advice |
Let me try. I let my users store their arbitrary documents in Milvus. I let them define which fields should be used to make embeddings and which are metadata. For each tenant I create a different collection. Users define from which fields on the original documents I should make embeddings and which to use as metadata for filtering purposes. Let's say one of my users has collection of "articles" and defined "category" as a metadata field that can be of any string value ("sport", "news",...). I would like to get distinct values of said "category" field - is that possible within Milvus? |
I also couldn't find how to do this. |
I thought groupby feature is what you are looking for. |
This would work indeed. Looking forward. |
My use case is reading all unique values of a Milvus collection column. More specifically the column I use for partition key. Since Milvus "maps" that to a standardized name ( |
So that's saying you want to know how many partition keys are there in total? |
which means count the distinct partitionkey |
/assign @jaime0815 |
I have a similar use case: I take a book, split it into chunks and then store the book title in scalar column for each chunk. I then process n books. When doing the vector search, I want to filter by a book (or multiple). With this functionality I could:
|
I second to @lehotskysamuel. |
Does anyone know if it's solved or not ? |
This feature makes it much easier to support an incremental update. |
Can you explain a little bit about your use case? see https://milvus.io/docs/single-vector-search.md#Grouping-search |
Has there been any progression on this? My use case is still the same, for example: |
So you want to search topk for different colors? or simply count different colors in this collection? |
I simply need to know all colors that exists in the collection, so I can display appropriate filters on the frontend for the users. Right now I have to store this information in a different database to get this information. EDIT: To explain further on the colors example - I do not know what colors there are in the collection and neither does the user. I need to give this information back to the UI, so users can chose to search only for documents that are "red" or "green". |
Hi. |
I think it's on the roadmap for middle of 2025
|
Is there an existing issue for this?
Is your feature request related to a problem? Please describe.
Find all the unique field values in a collection without having to iterate through all data.
Describe the solution you'd like.
Something equivalent to sql query(select distinct field_name from mytable)
Describe an alternate solution.
No response
Anything else? (Additional Context)
No response
The text was updated successfully, but these errors were encountered: