Hello,
I'm trying to find a tip to retrieve the document count of each index
in elastic with a single request
Ex: in elastic there is:
Index1 with 10 document,
Index2 with 20 document,
Index3 with 30 document,
Index4 with 40 document,
Index5 with 50 document,
do
GET Index1/_count ==> 10
GET Index2/_count ==> 20
but
GET Index*/_count ==> 150 this is the total of documents from all indices
Do you have any idea how to do it
to have a return as follows: ?
{
"Index1": 10,
"Index2": 20,
"Index3" : 30,
"Index4": 40 ,
"Index5" : 50
}
Thank you for the answer,
The first request works very well
however we cannot use a request : _cat/indices
because it does not return the number of document on elastic but it is based on the Lucene engine to return information that does not correspond to a count
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.