Hi, I have a basic collection of cities in Typesen...
# community-help
g
Hi, I have a basic collection of cities in Typesense cloud. It seems I have at least one or two corrupted documents stored. I got this exception whenever I try to group them:
TypeError: Cannot read properties of null (reading 'id')
In case I do not group them I can also see the page display less results than the results found. Here is the multisearch result
Copy code
grouped_hits: [{group_key: [], hits: [{document: null}]},…]
Here is the error locally in my machine, but the same happen in Typesense cloud, except the error comes from the minized bundle.
Copy code
client.js?ab48:1 TypeError: Cannot read properties of null (reading 'id')
    at eval (SearchResponseAdapter.js?8188:58:1)
    at Array.map (<anonymous>)
    at SearchResponseAdapter._adaptHits (SearchResponseAdapter.js?8188:55:1)
    at eval (SearchResponseAdapter.js?8188:41:1)
    at Array.map (<anonymous>)
    at SearchResponseAdapter._adaptGroupedHits (SearchResponseAdapter.js?8188:40:1)
    at SearchResponseAdapter.adapt (SearchResponseAdapter.js?8188:173:1)
    at eval (TypesenseInstantsearchAdapter.js?2572:70:1)
    at Array.map (<anonymous>)
    at TypesenseInstantsearchAdapter._callee$ (TypesenseInstantsearchAdapter.js?2572:66:1)
    at tryCatch (regeneratorRuntime.js?8727:44:1)
    at Generator.eval (regeneratorRuntime.js?8727:125:1)
    at Generator.eval [as next] (regeneratorRuntime.js?8727:69:1)
    at asyncGeneratorStep (asyncToGenerator.js?af4f:3:1)
    at _next (asyncToGenerator.js?af4f:22:1)
How could I troubleshoot that ? Thanks for help
j
Could you share a screenshot of the “search parameters” section in Typesense Cloud?
g
message has been deleted
j
Could you DM me your cluster ID as well?
Could you share the query term you used as well?
(I’m essentially trying to replicate the issue on my end)
g
lanc
The issue can be seen also with only: queryBy: city && q=lanc The warning won't be here but the displayed results are 2 on 4 results
j
It seems like there’s a document that’s corrupted somehow on disk:
The UI expects at least the ID field to show up in a document, since Typesense auto-generates it if one is not sent in the document
So this is throwing things off
g
Is there a mean to get its id to delete it ?
j
You’re currently running `0.23.0.rc27`… and I vaguely remember fixing some related issues in more recent builds. Can we upgrade you to the latest 0.24.1.rc?
g
Is there any changelog I should read before or there should not be any breaking things between those version ?
j
These are the two changelogs I’d recommend reviewing: https://typesense.org/docs/0.23.1/api/ https://typesense.org/docs/0.24.0/api/ 0.24.1 just has some bug fixes from 0.24.0
g
There are some stuff to check. I will try locally this version first and DM you if it is fine for you ? Thanks
j
Sure
g
All good, Shall I trigger a snapshot before you trigger the version upgrade ? I'm not so sure of the procedure on Typesense Cloud
j
We do that automatically on our side when we upgrade
I’ll queue up the upgrade now
g
Ok thanks
One more thing
How can I manage cors domain
j
In Typesense Cloud, we set it to
*
and we don’t allow that to be configurable
(Mainly because it can be easily spoofed by users using direct curl requests)
g
Ok I see 👍
j
The upgrade is now complete. Looks like the issue is now fixed…
g
Ok perfect the migration fixed it .D
🙌 1
Thanks a lot
👍 1