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

ASF subversion and git services commented on SOLR-14514:
--------------------------------------------------------

Commit 6ff4a9b395a68d9b0d9e259537e3f5daf0278d51 in lucene-solr's branch 
refs/heads/master from Munendra S N
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=6ff4a9b ]

SOLR-14514: add extra checks for picking 'stream' method in JSON facet

missing, allBuckets, and numBuckets is not supported with stream method.
So, avoiding picking stream method when any one of them is enabled even if
facet sort is 'index asc'


> json.facets: method:stream is incompatible with allBuckets:true
> ---------------------------------------------------------------
>
>                 Key: SOLR-14514
>                 URL: https://issues.apache.org/jira/browse/SOLR-14514
>             Project: Solr
>          Issue Type: Bug
>          Components: Facet Module
>            Reporter: Chris M. Hostetter
>            Assignee: Munendra S N
>            Priority: Minor
>         Attachments: SOLR-14514.patch
>
>
> {{FacetFieldProcessorByEnumTermsStream}} has never supported 
> {{allBuckets:true}} but it also doesn't fail outright if {{allBuckets:true}} 
> is specified -- instead the bucket is silently missing from the response.
> Given how the {{method}} option is only used as a suggestion, and the actuall 
> processor can change based on hueristics about the request, this means that 
> the behavior of combining {{allBuckets:true}} with {{method:stream}} can vary 
> depending on the other options specified -- notably the {{sort}}
> {noformat}
> % curl -sS -X POST http://localhost:8983/solr/techproducts/query -d 
> 'omitHeader=true&rows=0&q=*:*&json.facet={
>   x : {
>     type : terms,
>     method: stream,
>     field : manu_id_s,
>     allBuckets : true,
>     limit : 2,
>     } }'
>     
> {
>   "response":{"numFound":32,"start":0,"docs":[]
>   },
>   "facets":{
>     "count":32,
>     "x":{
>       "allBuckets":{
>         "count":18},
>       "buckets":[{
>           "val":"corsair",
>           "count":3},
>         {
>           "val":"belkin",
>           "count":2}]}}}
> % curl -sS -X POST http://localhost:8983/solr/techproducts/query -d 
> 'omitHeader=true&rows=0&q=*:*&json.facet={
>   x : {
>     type : terms,
>     method: stream,
>     field : manu_id_s,
>     allBuckets : true,
>     limit : 2,
>     sort: "index asc"
>     } }'
> {
>   "response":{"numFound":32,"start":0,"docs":[]
>   },
>   "facets":{
>     "count":32,
>     "x":{
>       "buckets":[{
>           "val":"apple",
>           "count":1},
>         {
>           "val":"asus",
>           "count":1}]}}}
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to