[ 
https://issues.apache.org/jira/browse/SOLR-7795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tomás Fernández Löbbe updated SOLR-7795:
----------------------------------------
    Attachment: SOLR-7795.patch

Thanks for the update, and sorry for the late response [~liahsuan]. I'm 
uploading a new patch with your changes and a couple of minor changes I did. I 
think the patch is mostly ready, but I still have to check how can this affect 
the integration with pivot faceting. 

If anyone has any comments on the API, please let me know:
The requests will look like this:
{noformat}
facet=true
&facet.range=price
&facet.range.start=0
&facet.range.end=50
&facet.range.gap=10
&rows=0
&f.price.facet.range.set=[0,2]
&wt=json
{noformat}

and the response like:
{noformat}
"facet_counts":{
    "facet_queries":{},
    "facet_fields":{},
    "facet_dates":{},
    "facet_ranges":{
      "price":{
        "counts":[
          "0.0",0,
          "10.0",0,
          "20.0",0,
          "30.0",0,
          "40.0",0],
        "gap":10.0,
        "start":0.0,
        "end":50.0,
        "intervals":{
          "[0,2]":0}}},
    "facet_intervals":{},
    "facet_heatmaps":{}}}
{noformat}

> Fold Interval Faceting into Range Faceting
> ------------------------------------------
>
>                 Key: SOLR-7795
>                 URL: https://issues.apache.org/jira/browse/SOLR-7795
>             Project: Solr
>          Issue Type: Task
>            Reporter: Tomás Fernández Löbbe
>             Fix For: 5.3, Trunk
>
>         Attachments: SOLR-7795.patch
>
>
> Now that range faceting supports a "filter" and a "dv" method, and that 
> interval faceting is supported on fields with {{docValues=false}}, I think we 
> should make it so that interval faceting is just a different way of 
> specifying ranges in range faceting, allowing users to indicate specific 
> ranges.
> I propose we use the same syntax for intervals, but under the "range" 
> parameter family:
> {noformat}
> facet.range=price&
> f.price.facet.range.set=[0,10]&
> f.price.facet.range.set=(10,100]
> {noformat}
> The counts for those ranges would come in the response also inside of the 
> "range_facets" section. I'm not sure if it's better to include the ranges in 
> the "counts" section, or in a different section (intervals?sets?buckets?). 
> I'm open to suggestions. 
> {code}
> "facet_ranges":{
>       "price":{
>         "counts":[
>           "[0,10]",3,
>           "(10,100]",2]
>        }
> }
> {code}
> or…
> {code}
> "facet_ranges":{
>       "price":{
>         "intervals":[
>           "[0,10]",3,
>           "(10,100]",2]
>        }
> }
> {code}
> We should support people specifying both things on the same field.
> Once this is done, "interval faceting" could be deprecated, as all it's 
> functionality is now possible through range queries. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to