#community-help

Troubleshooting Alias Errors and Document Additions

TLDR David faced issues with aliasing and adding documents to their platform. Jason aided in the troubleshooting. The issue was resolved when David corrected a data type mismatch in their schema.

Powered by Struct AI
+11
cry1
24
10mo
Solved
Join the chat
Nov 24, 2022 (10 months ago)
David
Photo of md5-07c4f1bfa85fc4a2759ba7302f0b86da
David
04:37 PM
is something wrong with aliasing atm?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:38 PM
Every cluster is independent and we don’t auto upgrade clusters. Could you share you cluster ID?
David
Photo of md5-07c4f1bfa85fc4a2759ba7302f0b86da
David
04:44 PM
example page that doesn't load any results https://beta.hem.com/en-eu/furniture/chairs-and-stools

cluster id: dq56azlcmuwh2i90p
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:45 PM
Looking at the network requests, made on that page, I see calls to Typesense successfully returning results…
David
Photo of md5-07c4f1bfa85fc4a2759ba7302f0b86da
David
04:45 PM
no wait, seem to be unrelated. ignore me
04:46
David
04:46 PM
yes i see. it's something I do when adding results
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:46 PM
I also see search requests coming into your cluster
David
Photo of md5-07c4f1bfa85fc4a2759ba7302f0b86da
David
04:46 PM
ok, thank you for chekcing ❤️
+11
05:50
David
05:50 PM
Jason sorry, could you see if there are any errors in adding documents?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:57 PM
I don’t see anything in the logs…
David
Photo of md5-07c4f1bfa85fc4a2759ba7302f0b86da
David
05:57 PM
Ok, thank you for verifying / checking
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:58 PM
Are you seeing any errors on your side with writes?
David
Photo of md5-07c4f1bfa85fc4a2759ba7302f0b86da
David
05:58 PM
Not that I can see, but my logging on CI (Gatsby Cloud) is practically non-existent
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:59 PM
Ah, are you able to run it locally may be, to check for any errors? The kind of errors I’d see on my side are any unhandled JSON parsing issues for eg
06:00
Jason
06:00 PM
But if it’s a handled schema validation error for eg, we only return that in the API response
David
Photo of md5-07c4f1bfa85fc4a2759ba7302f0b86da
David
06:00 PM
its' more that we usually have ~1200+ documents, but now there's only 172
06:01
David
06:01 PM
just in time for Black Friday 🥳
cry1
06:01
David
06:01 PM
haha
06:01
David
06:01 PM
classic
09:19
David
09:19 PM
… and it's working! It had to do with my schema, where I had the price as int32, and I was sending it floats as the price was now discounted. I didn't see any errors though when sending as JSONL, but adding documents directly as a normal array showed the errors.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
09:21 PM
Ah! Glad you found the issue. Btw, the import endpoint which accepts JSONL will always return a 200, you need to look at the response body for the actual error.

We do this because in a bulk import some documents might be successfully imported and others might fail, and we don’t want to return a failing http code just because of a few failures
David
Photo of md5-07c4f1bfa85fc4a2759ba7302f0b86da
David
09:21 PM
Makes perfect sense, just hadn't encountered it before and it took a while to figure out where to look (is it Gatsby? Shopify? Typesense? Etc
09:23
David
09:23 PM
Thank you for helping out, even on Thanksgiving. LMK if you want a nice discount on any Hem furniture hehe. https://beta.hem.com/en-us
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
09:24 PM
Haha! Happy to help 🙂

Happy Thanksgiving!