You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Dotan Cohen <do...@gmail.com> on 2013/06/30 11:51:34 UTC

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

Re: No date.gap on pivoted facets

Posted by Dotan Cohen <do...@gmail.com>.
On Sun, Jun 30, 2013 at 5:33 PM, Jack Krupansky <ja...@basetechnology.com> wrote:
> Sorry, but Solr pivot faceting is based solely on "field" facets, not
> "range" (or "date") facets.
>

Thank you. I tried adding that information to the
SimpleFacetParameters wiki page, but that page seems to be defined as
"Immutable Page".


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

Thank you, this is what I have done.


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

Terrific, I anticipate the release. Next release? Did I miss the release?
http://www.amazon.com/Lucene-Solr-Definitive-comprehensive-realtime/dp/1449359957/

--
Dotan Cohen

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

Re: No date.gap on pivoted facets

Posted by Jack Krupansky <ja...@basetechnology.com>.
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