"size" attribute doesn't seem to work with date_histogram facets

Is the "size" attribute supposed to work with date_histogram facets the
same way it works with terms facets? I can successfully limit the total
number of terms facets returned by adding a size attribute to my query, but
that attribute has no affect on date_histogram facets.

Also, is it by design that date_histogram facets do not default to sorting
by count value (like terms facets do) but instead, sort by their time
value, ascending?

(Also, I posted this topic earlier this morning but Google Groups reports
"That topic no longer exists." I'm not sure why.)

--

You can see the various options by looking at
the DateHistogramFacetProcessor class

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/search/facet/datehistogram/DateHistogramFacetProcessor.java

Size is not supported. The various sorting options (time, count, total) are
presented here:

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/search/facet/datehistogram/DateHistogramFacet.java#L48

Cheers,

Ivan

On Wed, Jan 23, 2013 at 9:47 AM, Brian 'Phunk' Gadoury <
bgadoury@endpoint.com> wrote:

Is the "size" attribute supposed to work with date_histogram facets the
same way it works with terms facets? I can successfully limit the total
number of terms facets returned by adding a size attribute to my query, but
that attribute has no affect on date_histogram facets.

Also, is it by design that date_histogram facets do not default to sorting
by count value (like terms facets do) but instead, sort by their time
value, ascending?

(Also, I posted this topic earlier this morning but Google Groups reports
"That topic no longer exists." I'm not sure why.)

--

--

Thank you for the reply, Ivan.

Shortly after I posted this thread, I spotted that the ES documentation
discusses the size, etc. options for the Terms facet, but not for
date_histogram. Whoops.

I guess I'll force the sort option in my queries to get that consistent
between different facet types. Then I'll just limit the facet count once I
get the response back from ES.

Thanks again.
-Phunk

On Wednesday, January 23, 2013 10:57:27 AM UTC-7, Ivan Brusic wrote:

You can see the various options by looking at
the DateHistogramFacetProcessor class

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/search/facet/datehistogram/DateHistogramFacetProcessor.java

Size is not supported. The various sorting options (time, count, total)
are presented here:

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/search/facet/datehistogram/DateHistogramFacet.java#L48

Cheers,

Ivan

On Wed, Jan 23, 2013 at 9:47 AM, Brian 'Phunk' Gadoury <
bgad...@endpoint.com <javascript:>> wrote:

Is the "size" attribute supposed to work with date_histogram facets the
same way it works with terms facets? I can successfully limit the total
number of terms facets returned by adding a size attribute to my query, but
that attribute has no affect on date_histogram facets.

Also, is it by design that date_histogram facets do not default to
sorting by count value (like terms facets do) but instead, sort by their
time value, ascending?

(Also, I posted this topic earlier this morning but Google Groups reports
"That topic no longer exists." I'm not sure why.)

--

--