[ https://issues.apache.org/jira/browse/SOLR-2366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13101204#comment-13101204 ]
Jan Høydahl commented on SOLR-2366: ----------------------------------- One thing this improvement needs to tackle is how to return the range buckets in the Response. It will not be enough with the simple range_facet format {code:xml} <lst name="facet_ranges"> <lst name="url_length"> <lst name="counts"> <int name="42">1</int> <int name="45">1</int> <int name="51">1</int> <int name="66">1</int> </lst> <int name="gap">3</int> <int name="start">0</int> <int name="end">102</int> </lst> </lst> {code} We need something which can return the explicit ranges, similar to what facet_queries has. This format can then be used for the old plain gap format as well. {code:xml} <lst name="facet_ranges"> <lst name="url_length"> <lst name="counts"> <int name="[42 TO 45}">1</int> <int name="[45 TO 48}">1</int> <int name="[51 TO 54}">1</int> <int name="[66 TO 69}">1</int> </lst> <int name="gap">3</int> <int name="start">0</int> <int name="end">102</int> </lst> <lst name="bedrooms"> <lst name="counts"> <int name="[1 TO *]">12</int> <int name="[2 TO *]">31</int> <int name="[3 TO *]">26</int> <int name="[4 TO *]">9</int> </lst> <int name="spec">1..*,2..*,3..*,4..*</int> <int name="include">all</int> </lst> </lst> {code} > 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.4, 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. > (Original syntax proposal removed, see discussion for concrete syntax) -- 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