[ 
https://issues.apache.org/jira/browse/SOLR-2366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996176#comment-12996176
 ] 

Yonik Seeley commented on SOLR-2366:
------------------------------------

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

I agree - it requires summing all previous deltas to figure out what the 
current range actually is.
I think we need to drive this from use-cases.  The first use case that comes to 
mind is price ranges... and that would be a pain to insert a new price range if 
we were just dealing with a list of deltas.  Anything I can think of where you 
would want variable sized buckets, it seems like you care more about the 
absolute values of those buckets, rather than their delta to the previous 
bucket.

I pretty much came up with what Hoss suggested I think (except I didn't think 
of the "..." syntax).

We could potentially support a mix of absolute starting points and ranges:
0,5,10,20,100-1000
Normally one would stick to one syntax or the other in a single request, but we 
could support both in a single parameter as a convenience.


> Facet Range Gaps
> ----------------
>
>                 Key: SOLR-2366
>                 URL: https://issues.apache.org/jira/browse/SOLR-2366
>             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
> facet.range.gap=5,25,50,100
> 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: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to