#community-help

Debugging Import Failures in Example Search Application

TLDR satish was having trouble getting search results in an application. Kishore Nallan explained that all endpoints are synchronous and suggested checking the import response for errors. The issue was resolved when satish found a mistake in the sorting field name.

Powered by Struct AI

1

6
19mo
Solved
Join the chat
Apr 05, 2022 (19 months ago)
satish
Photo of md5-21068ce5c0a7db9d103fad551dbefbc7
satish
09:21 AM
I am trying example search application in Guide. I imported the file using the import endpoint and got 200 back and I searched with the query given in the same page and I am not getting the result. Do I have to wait for the Import to index data. Is there a way to get the count of documents in the index
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:30 AM
All endpoints are synchronous so it would get indexed and be available as soon as the call ends.

Hit the /collections endpoint to see the count of documents and other collection metadata.
satish
Photo of md5-21068ce5c0a7db9d103fad551dbefbc7
satish
09:33 AM
Thanks Kishore Nallan. I am getting 0 as the number of documents. How can we debug the Import failures.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:34 AM
Check the import response. The body will contain the error. Each line in import response corresponds to respective line in import body.
09:39
Kishore Nallan
09:39 AM
satish
Photo of md5-21068ce5c0a7db9d103fad551dbefbc7
satish
11:22 AM
Thanks found the error . I got the sorting field name wrong .

1