: I have to create two facets on a date field: : 1) First Facet will have results between two date range , i.e. [NOW TO : NOW+45DAYS] : 2) Second Facet will have results between two date range , i.e. [NOW-45DAYS : TO NOW]
the date faceting code is designed to generate counts for regular intervals of times (specified by "gap") between a fixed start and end. you could probably get what you want with something like... facet.date.start = NOW-45DAYS facet.date.end = NOW+45DAYS facet.date.gap = +45DAYS ...but to be perfectly honest, if you know you want exactly two counts, one for hte last 45 days and one for the next 45 days, then date faceting is overkill (and overly complicated) for your use case ... just use facet queries... facet.query=productPublicationDate_product_dt:[NOW-45DAYS TO NOW] facet.query=productPublicationDate_product_dt:[NOW TO NOW+45DAYS] BTW: you'll probably want to replace "NOW" with "NOW/DAY" or "NOW/HOUR" to round down and get better cache utilization. -Hoss