lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Unexpected results in Solr 4 Pivot Faceting
Date Fri, 07 Sep 2012 13:05:29 GMT

On Sep 7, 2012, at 08:36 , Dotan Cohen wrote:

> On Fri, Sep 7, 2012 at 12:23 PM, Erik Hatcher <> wrote:
>> Pivot facets currently only work with individual terms, not ranges.
>> The response you provided does look odd in that there are duplicate timestamps listed,
but pivots were only implemented for textual (string being the most common type) fields initially.
> I see, thanks. Other than creating an additional rounded-off timestamp
> field, are there any other solutions? Might ranges work if instead of
> a timestamp we used a real DateTime field?
> In any case, in order to pivot on the timestamp, will I have to change
> its type to string?

Ranges won't work at all.... pivots are purely by individual term currently.

If you want to pivot by ranges, and you can define those ranges during indexing, then you
could make a field that represented which range each document is in.

    id: 1234
    category: History
    date_range_buckets: 2004/March->June

or something like that.  Then you could pivot on category and date_range_buckets.  It's a
hacky workaround, but might just be sufficient for some cases.


View raw message