Is my index/ES install corrupt?

Hey all,

I have a few indexes locally. I index a load of data and occasionally, an index seems to delete all but two documents.

This has happened a few times now to different indexes. There seems to be a mismatch in data. _count shows there are two results. _search shows there are two results. However _cat/indices says there are 536!

Has anyone had this issues before?

  • I have tried restarting ES
  • I have deleted the index and re-indexed


50

ES: 6.2.2
OS: OSX 10.13.4

Thanks in advance

What is the query that returns a count of 2? Are you using nested objects in your mappings?

Thanks for the reply Christian.

GET /wb_analytics/default/_count

And also I get two results with

GET /wb_analytics/default/_search

And yeah, there a couple of nested objects. Could that be the issue?

Nested objects are stored as separate documents behind the scenes, so would result in a higher count in the _cat/indices API.

Ahh OK, so there could be something wrong with my indexing then I guess. There are a lot of nested objects and a rough count up on one document gets me close to the total.

I bet that is it. Thanks for the pointer Christian. I'll report back once I have investigated.

Cheers

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.