lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll (JIRA)" <>
Subject [jira] Commented: (SOLR-2366) Facet Range Gaps
Date Fri, 18 Feb 2011 00:22:12 GMT


Grant Ingersoll commented on SOLR-2366:

Hoss, I can live with ranges.  I had originally thought of doing that, but decided this syntax
is simpler, especially for dates.  Then again, we could just as well support both.  The nice
thing doing ranges gives you is you can have non-contiguous ranges, which might be interesting
to some.

As for:
bq. would be hard pressed to explain why the resulting ranges were...

It really isn't that hard to explain:
{quote}start + gap[0], prevEnd + gap[1], ... prevEnd + gap[i], ... prevEnd + gap[n] (and repeating
until end){quote}
In other words, it's a variable width gap starting at whatever the last end point was.

> Facet Range Gaps
> ----------------
>                 Key: SOLR-2366
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Grant Ingersoll
>            Priority: Minor
>             Fix For: 3.2, 4.0
>         Attachments: SOLR-2366.patch, SOLR-2366.patch
> There really is no reason why the range gap for date and numeric faceting needs to be
evenly spaced.  For instance, if and when SOLR-1581 is completed and one were doing spatial
distance calculations, one could facet by function into 3 different sized buckets: walking
distance (0-5KM), driving distance (5KM-150KM) and everything else (150KM+), for instance.
 We should be able to quantize the results into arbitrarily sized buckets.  I'd propose the
syntax to be a comma separated list of sizes for each bucket.  If only one value is specified,
then it behaves as it currently does.  Otherwise, it creates the different size buckets. 
If the number of buckets doesn't evenly divide up the space, then the size of the last bucket
specified is used to fill out the remaining space (not sure on this)
> For instance,
> facet.range.start=0
> facet.range.end=400
> would yield buckets of:
> 0-5,5-30,30-80,80-180,180-280,280-380,380-400

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message