Closed (fixed)
Project:
Milvus VDB Provider
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 May 2025 at 05:38 UTC
Updated:
16 Oct 2025 at 08:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
scott_euser commentedComment #5
scott_euser commentedExample group by field added to make it easier for people to test how this behaves in the meantime.
Postponed on #3526390: Improve the AI Search recursive retrieval of a specific quantity of results
Comment #6
scott_euser commentedComment #7
gxleano commentedComment #8
gxleano commentedThis issue should be tested with MR https://www.drupal.org/project/ai/issues/3526390, from where some new methods are coming.
Comment #9
gxleano commentedComment #10
scott_euser commentedThanks for the progress here! I added feedback to #3526390: Improve the AI Search recursive retrieval of a specific quantity of results
Comment #11
scott_euser commentedAdded a nitpick + a question, thanks!
Comment #12
scott_euser commentedHad a proper test of this but unfortunately Grouping is just not working as advertised at the docs page https://milvus.io/docs/grouping-search.md
I did set the group size to 1 per my review comment and tried with both strict true and false (though from my understanding of the docs, false should be fine).
You can see in this screenshot the debug of params + debug of the results in ::searchWithGrouping() shows all items have same drupal_entity_id yet are not grouped together:
Comment #13
scott_euser commentedFrom Slack message I think this is needs review again as well
Comment #14
scott_euser commentedOkay updated ddev container #3549396: Update docker examples to give this a retest as discussion in slack
Comment #15
scott_euser commentedGave this a retest, Milvus 2.5.18 and not working for me still sorry. Here's how I am testing:
How are you testing this out yourself? Before MR can you confirm you're getting 2 chunks from same drupal_entity_id, then checking out this MR and you're subsequently getting just 1 chunk from drupal_entity_id?
Added this to ::searchWithGrouping() to demonstrate:
Screenshot of Milvus version:
Maybe there is some setup needed to achieve the below bit of the docs here?
Comment #16
scott_euser commentedOkay I dove into this in more detail and I can see that the field actually needs to be created separately, and not just as an attribute in the generic $meta field (the 'dynamic' field) where we were putting drupal_entity_id, drupal_long_id, and any other filterable attributes.
I documented in comments the approach in more detail. To make use of this you actually have to fully drop your existing collection as the field seems to need to be created at the moment the collection is created in the first place.
I think last step is to handle not forcing reindexing, but instead warning the site builder they should reindex when not supported which to me means:
Setting to Needs Review to get review on the approach, after which we can go back to Needs Work to implement the above (if others are in agreement)
Comment #17
gxleano commentedHey Scott!
I've added some changes and tested the solution, now grouping is working as expected on my side.
Maybe we should just create a new release for
2.xand point this issue to it.Comment #19
scott_euser commentedExcellent thank you!
Comment #21
scott_euser commentedI did create a follow-up in AI Search here #3549911: Recursive retrieval using the supported grouping may still need recursion as while this will mostly work, there are some edge cases where it still needs some recursive retrieval