On Wed, Nov 26, 2014 at 11:46 AM, Achim Domma <
ac...@uberresearch.com> wrote:
> I think I found the change from 0.07 to 0.08: The count function has gone!?
>
> We will go for the new API as soon as possible, but I would really
> appreciate if you could help to find a short term workaround. Here is my
> more detailed situation: For f.some_field.facet.stat I try to calculate the
> following aggregations:
>
> count:count()
> score:sum(query($qq))
> funding:sum(some_amount_in_usd)
>
> This code worked before, but not with 0.08 anymore. If I remove the count,
> everything is fine again. Checking the current documentation, I don't see
> count() anymore in the aggregation functions.
In the new API, document count is always reported, making it redundant to ask.
> I played around with different queries and in some cases I get back the
> count automatically, even without specifying count:count(). But not always
> and it looks like it has something to do with the sorting I specify. If I
> could force HS to always return the count, everything would be fine. Do you
> have any idea why I sometimes get the count and sometimes not? And how to
> enforce the count? That would solve all my problems.
Yes, in the old API I think you get back count only if you ask for it,
or are sorting by it (and the default sort is by count descending).
I could probably make a patch to 0.08 to restore count() within the
next couple of days (tomorrow is thanksgiving here in the US
though...)
-Yonik