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.

        Erik

On Sep 6, 2012, at 19:04 , Dotan Cohen wrote:

> In Solr 4, using this faceting pivot:
> 
> &facet=true
> &facet.field=provider
> &facet.range=timestamp
> &f.timestamp.facet.range.start=1346968500
> &f.timestamp.facet.range.end=1346969000
> &f.timestamp.facet.range.gap=100
> &facet.pivot=timestamp,provider
> 
> I am getting facet results with the timestamp -1325191116. In fact,
> most of them have that date. What am I doing wrong? I am trying to get
> a table of facets for each provider for each time period:
> 1346968500 - 1346968600
> 1346968600 - 1346968700
> 1346968700 - 1346968800
> 1346968800 - 1346968900
> 1346968900 - 1346969000
> 
> Assuming 12 providers and 5 time periods, I should be getting 60
> results. But I'm not, I am getting repeated results like this:
> 
> 52     <lst name="facet_pivot">
> 53       <arr name="timestamp,provider">
> 54         <lst>
> 55           <str name="field"> timestamp </str>
> 56           <int name="value"> -1325191116 </int>
> 57           <int name="count"> 17 </int>
> 58           <arr name="pivot"/>
> 59         </lst>
> 60         <lst>
> 61           <str name="field"> timestamp </str>
> 62           <int name="value"> -1325191116 </int>
> 63           <int name="count"> 17 </int>
> 64           <arr name="pivot"/>
> 65         </lst>
> 66         <lst>
> 67           <str name="field"> timestamp </str>
> 68           <int name="value"> -1325191116 </int>
> 69           <int name="count"> 15 </int>
> 70           <arr name="pivot"/>
> 71         </lst>
> 72         <lst>
> 73           <str name="field"> timestamp </str>
> 74           <int name="value"> -1325191116 </int>
> 75           <int name="count"> 14 </int>
> 76           <arr name="pivot"/>
> 77         </lst>
> 78         <lst>
> 79           <str name="field"> timestamp </str>
> 80           <int name="value"> -1325191116 </int>
> 81           <int name="count"> 14 </int>
> 82           <arr name="pivot"/>
> 83         </lst>
> 
> Note that I am connecting to a Solr 4 instance. Thanks for providing
> any insight.
> 
> 
> 
> 
> 
> -- 
> Dotan Cohen
> 
> http://gibberish.co.il
> http://what-is-what.com

Reply via email to