:wave: Hey Typesense team, I’m seeing a change in ...
# community-help
a
👋 Hey Typesense team, I’m seeing a change in behavior after upgrading to
v29.0.rc23
from
v28.0
and wanted to confirm if this is expected. We’re using the
/multi_search
endpoint to query the
supplierinventories_rpn
collection with a `group_by=supplierInfo, group_limit=500`and `per_page=1000.`In version
v28.0
, we were consistently getting around 54 groups, which matched the
found
key in the response. However, after upgrading to
v29.0.rc23
, the same request is now returning only 6 groups, even though the
found
key still correctly shows 54. Here’s the
curl
for reference (sanitized):
Copy code
curl --location 'https://<host>/multi_search?x-typesense-api-key=***' \
--header 'accept: application/json' \
--header 'content-type: text/plain' \
--data '{
  "searches": [
    {
      "query_by": "rootPartNumber",
      "per_page": 1000,
      "group_by": "supplierInfo",
      "group_limit": 500,
      "sort_by": "_group_found:desc",
      "collection": "supplierinventories_rpn",
      "q": "*",
      "filter_by": "(rootPartNumber:=[71711M55R00-5PK,17100M79M50,28113M79M00-C48,87460-76G00,13871M73K00])",
      "page": 1
    }
  ]
}'
Could you confirm if this is a bug or if there was a change in
group_by
behavior in v29? @Sahil Rally @Atishay Jain
k
cc @Harpreet Sangar
h
We did refactor group_by related code but the number of groups returned should still match the
found
count. @Ashutosh Thakur Is it possible for you to provide a minimal example for this issue?
a
Actually u can refer to the the above curl body, and recreate the same on ur side, We are just grouping by the unique key(suppliers), and there are 54 such documents (parts) which are having. So we basically had get 54 such suppliers which has some parts we are asking, but in response we were getting only 6, even though the found value was correct, still the group results were not matching it. but we noticed that for the same search body we got right response, on V28 but not in V29.
h
It would be easier to recreate if you could share a few values of
supplierInfo
.
a
supplierInfo
= `supplierName`(string) + ::(seperator) + `supplierId`(unique ObjectId for a suppplier)
k
Please share a reproducible example in this format: https://gist.github.com/jasonbosco/7c3432713216c378472f13e72246f46b We will be happy to debug.
a
Sure will do
k
@Ashutosh Thakur we have a few other customers using group by on this refactored implementation but we haven't noticed any issues yet. So the issue here could be an unaccounted edge case. If you can share a dataset and query or some minimal reproducible example we can investigate and fix. Thanks.
👍 1
a
Sorry for delay, but today i will share the details to re-create the issue
🙌 1
@Kishore Nallan I have share u the all things u require to recreate the issue in DM
k
Managed to identify the issue. Will have a fixed build in a day or so.
a
Thanks 🙌, but can u please give me little context why was this behavior occuring?
k
The group by field being used has special characters that were messing up some internal filtering we do.
a
Ooo yeahh that's logical, thats why found value was correct but the filtered result was not matching the same
k
Fixed in
29.0.rc26
🙌 1