hi guys,

  I am indexing events in solr, where every Event contains a startDate and
endDate.

  On the search page, I would like to have a Date Facet where users can
quickly browse through dates they are interested in.

  I have a field daysForFilter in each document which stores timestamps from
today till endDate as yyyy-MM-ddT00:00:01Z. The reason I have kept 01
seconds is to avoid overlap between two dates when calculating facets. My
application works on IST time zone, thus date 2009-10-24 00:00:00 is stored
in solr as 2009-10-23 18:30:00.

  I am using Date Faceting on this field, and the date facet query is
something like this.


q=<something>&facet=true&facet.date=daysForFilter&facet.date.start=2009-10-23T18:30:01Z&facet.date.gap=%2B1DAY&facet.date.end=2009-10-28T18:30:01Z

  Ideally I should get correct date facets with count of events occuring on
that date. But for some dates I get count more that existing in the result.
For example I get total 18 documents for my query, and the facet count for
date 2009-10-23T18:30:01Z is 11; whereas there are only 5 documents
containing this field value. I have verified this in result. Also when I
query for daysForFilter:2009-10-23T18:30:01Z, it gives me 5 results.

  I am really helpless with this problem, and do not understand why its
generating such wrong facets.
  It would be great if any one can guide me further.

regards,
aakash

Reply via email to