On Sep 7, 2012, at 09:29 , Dotan Cohen wrote:

> On Fri, Sep 7, 2012 at 4:05 PM, Erik Hatcher <erik.hatc...@gmail.com> wrote:
> 
>> 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.
>> 
> 
> Thanks. As there are other applications using the index I was hoping
> to avoid adding a redundant work-around field. But it looks like the
> best solution.
> 
> Just to be clear, as I'm not logged onto the dev server at the moment
> but it was implied in an earlier mail: Any field that is to be pivoted
> on needs to be a string field? Is that documented, as I cannot find
> that in the docs.

No, it doesn't need to be a string field.... but whatever terms come out of the 
analysis process are what gets faceted upon.  If it was a "text" field, each 
word in the field would be a facet value.  A "trie" field probably doesn't work 
properly, as it indexes multiple terms per value and you'd get odd values.   
Pivot faceting was initially implemented only with textual terms in mind, and 
string is generally the desired type.

        Erik

Reply via email to