Hey Adrien ,Thank you.I have one more question on aggregating on dates . We actually stored date time in a field called "createdDateTime" but I need only aggregates on date part of date time .
Any ideas ? Or sample code can help us ? Regards Nagaraju 908 517 6981 On Wed, Jan 14, 2015 at 6:10 AM, Adrien Grand < [email protected]> wrote: > > > On Wed, Jan 14, 2015 at 10:37 AM, buddarapu nagaraju < > [email protected]> wrote: > >> Does term aggregation counts on blank field values ? >> >> > Yes, an empty value "" counts as a term. Note that you need the field to > be not analyzed for it to work (or to use an analyzer that emits empty > strings). Otherwise the standard analyzer would analyzer "" as an empty > list of tokens, so a field value of "" would not actually count... > > >> Does term aggregation is enough for doing date aggregation ? Or there any >> specific aggregations we have ?All I need in date aggregation is to know >> different dates and its counts ? >> > > A terms aggregation is enough, but a date_histogram aggregation is > generally more useful on dates as there are lots of unique values and it's > often more useful to group them based on the year, month or day. > > -- > Adrien Grand > > -- > You received this message because you are subscribed to a topic in the > Google Groups "elasticsearch" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/elasticsearch/i9N09n_-n38/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j74ZqbBN0zNW6-5Feu7xYTKkomzx%3DDMhx28inFVYLSu5Q%40mail.gmail.com > <https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j74ZqbBN0zNW6-5Feu7xYTKkomzx%3DDMhx28inFVYLSu5Q%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAFtuXXKp0JycJfNvLxPGN_5YL7P-X%3DGDzvmYJQ9NFN7Q%2BaJjQw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
