: I'm not sure if I am missing something of if this is a bug but I am facing an
: issue with the following scenario.

The specific scnerios you are descirbing is an interesting edge case -- 
but i believe it's working as designed.

basically the range generation logic that computes the set of "(low,high)" 
pairs stops once "end <= low" -- in your case, you are initially starting 
with "start==end", so the very first "low" range value is equal to 
"end", and no ranges are generated.

The "fix" to your situation, would require changing the logic to 
allow both the low & high values for a pair to be equal to each other 
-- but if we did that, then (in normal usage) where start < end, the 
logic for building up the ranges would always wind up generating an extra 
pair where low==high.

ie...

   facet.range.start = NOW/YEAR
   facet.range.end = NOW/YEAR+6MONTHS
   facet.range.gap = +1MONTH
   facet.rage.hardend = true

would result in ranges...

   2014-01-01,2014-02-01
   2014-02-01,2014-03-01
   2014-03-01,2014-04-01
   2014-04-01,2014-05-01
   2014-05-01,2014-06-01
   2014-06-01,2014-07-01
   2014-07-01,2014-07-01 <- unexpected.

Does that make sense?

I'm curous about your usecase though ... can you epxlain a little bit more 
about what you are doing?  i can't think of any reason to set start==end 
that wouldn't be better served using a simple facet.query -- so it kind of 
smells like an XY Problem...

https://people.apache.org/~hossman/#xyproblem

-Hoss
http://www.lucidworks.com/

Reply via email to