meilisearch / meilisearch-go

Golang wrapper for the Meilisearch API
https://www.meilisearch.com
MIT License
481 stars 81 forks source link

Add document failed #520

Open andyzhou opened 3 months ago

andyzhou commented 3 months ago

Description Add a json format document into search, api always response succeed, but new document not add into the search really.

Expected behavior Want the api return the reason when tips succeed but failed.

Current behavior Always return succeed, no any error.

Environment (please complete the following information):

andyzhou commented 3 months ago

Same code just remove search index and re-add new documents, all failed! Why the api no any error response for the fake succeed opt?

andyzhou commented 3 months ago

Very strange behavior happened, if i add a simple map struct data into index, and all failed json data can succeed add into search. It seemed a new index should need add a very simple data and other complex json can be added.

About the bad index, i use the api of GetStats to fetch, response value FieldDistribution is empty, and normal index can response correct value, it means index create failed?

curquiza commented 3 months ago

Hello @andyzhou

Meilisearch processes tasks asynchronously, you need to check the /tasks endpoint to know if your addition/update failed and why

More info: https://www.meilisearch.com/docs/learn/async/asynchronous_operations