Is my index/ES install corrupt?

(TobyC) #1

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


ES: 6.2.2
OS: OSX 10.13.4

Thanks in advance

(Christian Dahlqvist) #2

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

(TobyC) #3

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?

(Christian Dahlqvist) #4

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

(TobyC) #5

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.


(system) #6

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