To get total number of documents

Hi;
I want to fetch total number documents in an Index without using any
query.I found the count api but for that query is required where i am
only concerned with getting count of documents without query.

Thanks;

Hi,

Check admin API, it can tell you total no. of docs (per cluster, per node,
per index...). Do not remember from the top of my head which API exactly
that is, you have to try.

Regards,
Lukas
Dne 7.10.2011 8:06 "arien" ajaypadvi@gmail.com napsal(a):

Hi;
I want to fetch total number documents in an Index without using any
query.I found the count api but for that query is required where i am
only concerned with getting count of documents without query.

Thanks;

You can send a count request with a match all query, or, simplified using
the 'q' URI parameter, for example: curl 'host:9200/my_index/_count?q=*'. In
master (coming 0.18), if you don't specify a query, it will default to a
"match_all" query.

On Fri, Oct 7, 2011 at 8:05 AM, arien ajaypadvi@gmail.com wrote:

Hi;
I want to fetch total number documents in an Index without using any
query.I found the count api but for that query is required where i am
only concerned with getting count of documents without query.

Thanks;