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

> On Fri, Sep 7, 2012 at 12:23 PM, Erik Hatcher <erik.hatc...@gmail.com> 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.

  doc:  
    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.

        Erik

Reply via email to