Sorry, but Solr pivot faceting is based solely on "field" facets, not "range" (or "date") facets.

You can approximate date gaps by making a copy of your raw date field and then manually "gap" (truncate) the date values so that the their discrete values correspond to your date gap.

You can do that with an update processor, or do it before you send the data to Solr.

In the next release of my book I have a script for a StatelessScriptUpdateProccessor (with examples) that supports truncation of dates to a desired resolution, copying or modifying the input date as desired.

-- Jack Krupansky

-----Original Message----- From: Dotan Cohen
Sent: Sunday, June 30, 2013 5:51 AM
To: solr-user@lucene.apache.org
Subject: No date.gap on pivoted facets

Consider the following query:
select?q=*:*
&facet=true
&facet.date=added
&facet.date.start=2013-04-01T00:00:00Z
&facet.date.end=2013-06-30T00:00:00Z
&facet.date.gap=%2b7DAYS
&rows=0
&facet.pivot=added,provider

In this query, the facet.date.gap is ignored and each individual
second in faceted on. The issue remains the same even when reversing
the order of the pivot:
&facet.pivot=provider,added

Is this a Solr bug, or am I pivoting wrong? This is on Solr 4.1.0
running on OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) on
Ubuntu Server 12.04. Thank you!


--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

Reply via email to