Satisfactory number of search documents

I have an Elastic search with version 2.2. I created indexed and uploaded sample documents. I found some kind of problem in it. When i give

GET index/type/_count

I get the correct answer

{
   "count": 9998,
   "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
   }
}

But when I see things using http://IP:9200/_cat/indices?v

health status index pri rep docs.count docs.deleted store.size pri.store.size     
yellow open   index  5   1      79978            0     32.1mb         32.1mb 

Where docs.count: 79978. What's wrong.

Why do I see docs.count with the wrong value . The exact document number is 9998

+4
source share
1 answer

GET index/type/_count will return a top level counter.

docs.countin _cat/indicesreturns the number of all documents, including artificial documents created for nested fields.

This is why you see the difference:

  • (.. 9998) , Elasticsearch , .. .
  • (.. 79978) , Lucene .

, ES 5 , 1 ES, 6 Lucene. , ES 7 8 .

+8

All Articles