zqc0512
(andy_zhou)
December 20, 2017, 12:53am
1
[root@xx.xx.xx config]# curl -XGET http://xx.xx.xx:9200/xx-20171212-1224/_count?pretty
{
"count" : **467110397**,
"_shards" : {
"total" : 36,
"successful" : 36,
"skipped" : 0,
"failed" : 0
use kibana data count the data same with curl..
monitoring data not same with this..
zqc0512
(andy_zhou)
December 21, 2017, 1:08am
2
if i close the index. and open again.
the output is bad..
"_shards" : {
"total" : 108,
"successful" : 108,
"failed" : 0
},
"_all" : {
"primaries" : {
"docs" : {
"count" : 1164334263,
"deleted" : 0
},
"store" : {
"size_in_bytes" : 175744377852,
"throttle_time_in_millis" : 0
},
"indexing" : {
"index_total" : 0,
"index_time_in_millis" : 0,
"index_current" : 0,
"index_failed" : 0,
"delete_total" : 0,
"delete_time_in_millis" : 0,
"delete_current" : 0,
"noop_update_total" : 0,
"is_throttled" : false,
"throttle_time_in_millis" : 0
},
why?
zqc0512
(andy_zhou)
December 21, 2017, 6:57am
4
yes i see some indices in my cluster is the same .
but one type of index is no same...
dadoonet
(David Pilato)
December 21, 2017, 9:49am
5
In one case you count all the documents what ever the index is (1.164.334.263
) and in the other case you just looked at one index named xx-20171212-1224
(467.110.397
).
So everything looks good to me.
But in one of the screenshots, it shows 1.2B documents for 1 index alone. It shows "1 of 177" indices.
val
(Val Crettaz)
December 27, 2017, 5:12am
7
On the second screenshot, the count you see includes the nested documents that are present in top-level documents in your index.
Thanks for the clarification @val . Does that mean the curl
request doesn't include the nested documents?
val
(Val Crettaz)
December 27, 2017, 5:19am
9
The _count
API does not include the number of nested documents in your index, indeed. Instead you can use the following call to get the correct doc count including the nested ones
curl -XGET http://xx.xx.xx:9200/xx-20171212-1224/_stats/docs?pretty
Awesome. It was quite a learning. Thank you Val.
zqc0512
(andy_zhou)
December 28, 2017, 2:54am
12
it the all number of docs?
val
(Val Crettaz)
December 28, 2017, 4:54am
13
I didn't get you @zqc0512
system
(system)
Closed
January 25, 2018, 4:54am
14
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.