#community-help

Resolving Content Indexing Problems with Typesense

TLDR Maik experienced issues with indexing content in typesense. Kishore Nallan and Md suggested checking the import response and added error handling to identify and address the errors. Maik successfully located the issue.

Powered by Struct AI
12
11mo
Solved
Join the chat
Nov 24, 2022 (11 months ago)
Maik
Photo of md5-07851cfa3776849d56f5756332a2bff2
Maik
01:59 PM
Hello, thx for developing typesense it is much fun so far. But currently in have the strange situation that when i index content in a collection, it looks like it was done, no errors, but the collection stays empty. Any idea how i can get to it?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
02:08 PM
Can you check the content of the import response? I think some fields were not confirming to the schema so were likely ignored.
Maik
Photo of md5-07851cfa3776849d56f5756332a2bff2
Maik
02:09 PM
but should there no message error or something like this?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
02:18 PM
During import some documents can succeed, while others can fail. So we handle failure at a per document level.
Md
Photo of md5-4c155ba3e9038148c2637f40aa514679
Md
03:20 PM
you can add try catch logic , I have done with django management commands and signals
Maik
Photo of md5-07851cfa3776849d56f5756332a2bff2
Maik
03:22 PM
since there is no trace, try/except does not help me. But i guess i have to do a single creation to see the problem then, right. Now i'm doing batch import which was working so far.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
03:22 PM
Just print the response of the import call, each line will contain the status of that particular document's import status.
Md
Photo of md5-4c155ba3e9038148c2637f40aa514679
Md
03:23 PM
Yes I am doing per documents upserts and new data will automatically be inserted or updated using post_save logic
Maik
Photo of md5-07851cfa3776849d56f5756332a2bff2
Maik
03:23 PM
ah thx, i'll look thre
03:23
Maik
03:23 PM
there
03:54
Maik
03:54 PM
thx i found the issues, now that i found the results ๐Ÿ˜‰
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
03:54 PM
๐Ÿ‘