Get count of documents through aggregation

Is it possible to get count of documents using aggregations?
I try using value count aggregation
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-valuecount-aggregation.html,
but it seems it only working if I provied the "field" parameter, counting
only documents containing this field.
I tried using the same aggregation with "_id" as field with no success.
Any ideas?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f1379db8-5b3f-4f3a-b5c5-88f44c41d263%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Can you elaborate a bit more on what you would like to do? Depending on
your use-case, you can already use the total hit count returned by the
search API, the count API or aggregations.

On Sat, Dec 27, 2014 at 9:53 PM, myname shlaflaf@gmail.com wrote:

Is it possible to get count of documents using aggregations?
I try using value count aggregation
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-valuecount-aggregation.html,
but it seems it only working if I provied the "field" parameter, counting
only documents containing this field.
I tried using the same aggregation with "_id" as field with no success.
Any ideas?

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/f1379db8-5b3f-4f3a-b5c5-88f44c41d263%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/f1379db8-5b3f-4f3a-b5c5-88f44c41d263%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Adrien Grand

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7dcKqV3%2ByAsGABER0YKHONDLGni%2BoWeYj1zA1ZAHF0HQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

I am building SQL api for elasticsearch, I want all sql function
(count,avg, sum) to return as aggregation result.
I already succeed doing this query using the field _index. it seems to
working.

בתאריך יום שני, 29 בדצמבר 2014 12:45:07 UTC+2, מאת Adrien Grand:

Can you elaborate a bit more on what you would like to do? Depending on
your use-case, you can already use the total hit count returned by the
search API, the count API or aggregations.

On Sat, Dec 27, 2014 at 9:53 PM, myname <shla...@gmail.com <javascript:>>
wrote:

Is it possible to get count of documents using aggregations?
I try using value count aggregation
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-valuecount-aggregation.html,
but it seems it only working if I provied the "field" parameter, counting
only documents containing this field.
I tried using the same aggregation with "_id" as field with no success.
Any ideas?

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/f1379db8-5b3f-4f3a-b5c5-88f44c41d263%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/f1379db8-5b3f-4f3a-b5c5-88f44c41d263%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Adrien Grand

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2f0b38fe-5f82-4a77-a849-c44e147ef4ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.