Issues with Typesense Import API Document Indexing

TLDR Morgan experienced inconsistent document indexing using the Typesense Import API. Jason clarified that Typesense returns a success: true or false for each record in the batch import call.

Powered by Struct AI
Jan 12, 2022 (24 months ago)
Photo of md5-9af47d330848eae988a5f9cc03e413f1
11:04 PM
Hi I am using Typesense import API to import my data. The config I used is
Action: "upsert"
BatchSize: 100

I have 5 goroutines sending around 10000 documents and each request has about 500 documents. Each of them has unique key so there should be 10k document in my collection. But what I have found is the number of document is always smaller than what I actually sent, around 7k. And when I reduce the request size from 500 to 200, there are more documents show up in cluster. But I don’t see any feedback from Typesense if any of the batch was not successful.

Is it safe to say when importing, TS will not send whether the documents in the request has been successfully indexed? If so, what can I do to make sure the documents I send will be indexed?
Photo of md5-8813087cccc512313602b6d9f9ece19f
11:35 PM
Morgan Typesense does return success: true or false with every batch import call, for every record. If it’s success: false, it will also return the error why it failed