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 Delsey Sherrill <ds...@ll.mit.edu> on 2007/09/05 00:01:02 UTC

Date faceting problem

Hi,

This is my first post to the list, having done my FAQ/wiki/archive due diligence to no avail.

I'm having an issue w/ the date faceter, running solr 1.2.0 on Tomcat populated with the example 
data.  When I make a date facet request (example copied verbatim from the SimpleFacetParameter 
wikipage), I don't see any date facets in my response.

Here is the response I am getting:

<response>
   <lst name="responseHeader">
     <int name="status">0</int>
     <int name="QTime">0</int>
     <lst name="params">
       <str name="facet.date">timestamp</str>
       <str name="facet.date.end">NOW/DAY+1DAY</str>
       <str name="facet.date.gap">+1DAY</str>
       <str name="rows">0</str>
       <str name="facet">true</str>
       <str name="facet.date.start">NOW/DAY-5DAYS</str>
       <str name="indent">true</str>
       <str name="q">*:*</str>
     </lst>
   </lst>
   <result name="response" numFound="26" start="0"/>
   <lst name="facet_counts">
     <lst name="facet_queries"/>
     <lst name="facet_fields"/>
   </lst>
</response>

What's missing is the facet_dates tag, something like this...

   <lst name="facet_counts">
     <lst name="facet_dates">
      <lst name="timestamp">
         <int name="2007-08-11T00:00:00.000Z">1</int>
         <int name="2007-08-12T00:00:00.000Z">5</int>
         <int name="2007-08-13T00:00:00.000Z">3</int>
         <int name="2007-08-14T00:00:00.000Z">7</int>
         <int name="2007-08-15T00:00:00.000Z">2</int>
         <int name="2007-08-16T00:00:00.000Z">16</int>
         <str name="gap">+1DAY</str>
         <date name="end">2007-08-17T00:00:00Z</date>
      </lst>
     </lst>
   </lst>

Thinking that perhaps this was due to the fact that my docs are > 5 days old, I tried again w/ 
facet.date.start=NOW/DAY-30DAYS, but still the same result.

I'd appreciate if anyone could shed some light on this, or at least offer some suggestions for 
debugging.

-Delsey


Re: Date faceting problem

Posted by Chris Hostetter <ho...@fucit.org>.
: I'm having an issue w/ the date faceter, running solr 1.2.0 on Tomcat

Welcom to the list Delsey,

Date Faceting was only recently added to the Solr trunk ... there is a 
wiki convention of noting when docs refer to "bleeding edge" stuff not in 
the latest release by noting hte version it's expected to appear in 
ala: [Solr 1.3+]

I forgot to do this when document Date Facting, but i've fixed it now... 
sorry about that.



-Hoss