On Apr 27, 2010, at 4:02 PM, Király Péter wrote: > Dear Solr users, > > I am interesting, whether it is possible to get date facets without > intersecting > ranges. Now the documents which stands on boundaries of ranges are covered > by both ranges. An example: > > facet result (from Solr): > <int name="1000-01-01T00:00:00Z">3</int> > <int name="1100-01-01T00:00:00Z">3</int> > <int name="1200-01-01T00:00:00Z">12</int> > > If we translate into queries, it means that the number of document > matching query date_fc:[1000-01-01T00:00:00Z TO 1100-01-01T00:00:00Z] is 3, > and the number of document matching query > date_fc:[1100-01-01T00:00:00Z TO 1200-01-01T00:00:00Z] is 3 as well. > I have a document with date 1100-01-01T00:00:00Z, and it matches > both queries. I haven't found such parameters for date facets, but maybe you > know > a Solr secret, which prevents this intersection. I can do it with query > facets, > but that seems to be more complicated, than the very comfortable date facet > parameters.
You should be able to do inclusive/exclusive ranges using the query parser by mixing matching brackets [] and braces {}. See http://lucene.apache.org/java/2_9_1/queryparsersyntax.html#Range%20Searches -------------------------- Grant Ingersoll http://www.lucidimagination.com/ Search the Lucene ecosystem using Solr/Lucene: http://www.lucidimagination.com/search