Hi Chris,

I made a mistake in explaining the second part of my question. 

If you notice the faceted result, you will notice for results for the 2nd May 
2011 there are 4 results, but when I query for the 2nd May I  should get only 1 
result since after apply the offset all the remaining results should be shifted 
to the 3rd of May.

But I think i got the reason for this, I guess offset is applied to only the 
edges and not to the actual result. I mean when we say facet with an offset of 
+330MINUTES, what solr actually does is just move the facets by +330MINUTES, 
but 
not each and every document.

Regards,
Rohit



________________________________
From: Chris Hostetter <hossman_luc...@fucit.org>
To: solr-user@lucene.apache.org
Sent: Thu, 19 May, 2011 6:16:53 AM
Subject: RE: Solr Range Facets


: Thanks for explaining the point system, please find below the complete

Sorry .. that part was ment to be a joke, I think i was really tired when 
i wrote that.  The key take away: details matter.


:                     <int
: name="2011-05-02T05:30:00Z">4</int>
:                     <int
: name="2011-05-03T05:30:00Z">63</int>
:                     <int
: name="2011-05-04T05:30:00Z">0</int>
:                     <int
: name="2011-05-05T05:30:00Z">0</int>
    ...
: Now if you notice that the response show 4 records for the 2th of May 2011
: which will fall in the IST timezone (+330MINUTES), but when I try to get the

right.

: results I see that there is only 1 result for the 5th why is this happening.

Why do you say that?

According to those facet results, there are 0 docs between 
2011-05-05T05:30:00Z and 2011-05-05T05:30:00Z+1DAY (which is what i 
assume you mean by "the 5th" ... ie: "May 5th, in that timezone offset")

Not only that, but the query you posted isn't attempting to filter on "the 
5th" by any possible definition of the concept...

:             <str
: name="fq">createdOnGMTDate:[2011-05-01T00:00:00Z+330MINUTES TO *]
:             </str>

...that's saying you want all docs with a date on or after "the 1st".

: If I don't apply the offset the results match with the facet count, is there
: something wrong in my query?

it looks like your query is just plain wrong.  if you're goal was to 
drill down and show only documents from "the 5th" it should have been 
something like...

fq = createdOnGMTDate:[2011-05-05T00:00:00Z+330MINUTES TO 
2011-05-05T00:00:00Z+330MINUTES+1DAY]

...but note also that there is the question of "edge inclusion" and when 
you want to use [A TO B] vs [A TO B}.  The facet.range.include option is 
how you control wether the edges are used in the facet counts...

http://wiki.apache.org/solr/SimpleFacetParameters#facet.date.include


-Hoss

Reply via email to