On Tue, May 6, 2014 at 5:30 PM, Romain Rigaux <rom...@cloudera.com> wrote:
> This looks nice!
>
> The only missing piece for more interactivity would be to be able to map
> multiple field values into the same bucket.
>
> e.g.
>
> http://localhost:8983/solr/query?
>    q=*:*
>    &facet=true
>    &facet.field=*round(date, '15MINUTES')*
>    &facet.stat=sum(retweetCount)
>
> This is a bit similar to
> SOLR-4772<https://issues.apache.org/jira/browse/SOLR-4772>for the
> rounding.
>
> Then we could zoom out just by changing the size of the bucket, without any
> index change, e.g.:
> http://localhost:8983/solr/query?
>    q=*:*
>    &facet=true
>    &facet.field=*round(date, '1HOURS')*
>    &facet.stat=sum(retweetCount)

For this specific example, I think "map multiple field values into the
same bucket" equates to a range facet?

facet.range=mydatefield
facet.range.start=...
facet.range.end=...
facet.range.gap=+1HOURS
facet.stat=sum(retweetCount)

And then if you need additional breakouts by time range, you can use subfacets:

subfacet.mydatefield.field=mycategoryfield

That will provide retweet counts broken out by "mycategoryfield" for
every bucket produced by the range query.

See http://heliosearch.org/solr-subfacets/

-Yonik
http://heliosearch.org - facet functions, subfacets, off-heap filters&fieldcache

Reply via email to