algoliasearch-client-go icon indicating copy to clipboard operation
algoliasearch-client-go copied to clipboard

ReplaceAllObjects hangs indefinitely if the index does not exist

Open bep opened this issue 2 years ago • 0 comments

github.com/algolia/algoliasearch-client-go/v3 v3.25.0

I'm pretty sure this has worked at one point.

I'm using it like this:

index := client.InitIndex(indexName)
res, err := index.ReplaceAllObjects(iter, opt.Safe(true))

if err != nil {
	return err
}
return res.Wait()

I can see the tmp index being created with the correct amount of rows. If I manually create indexName before running the above, everything is OK.

My workaround is to use SaveObjects for non-existing indices.

bep avatar Jun 02 '22 16:06 bep