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

Yaniv Hemi updated SOLR-8293:
-----------------------------
    Description: 
When requesting for a facet using the facet API on a specific field that doesnt 
 have results, the response arrives without any other facet.
for example:
you have the following fields under meta_i_example
{code}
"example":[
        "-1",33743,
        "0",33739,
        "-2",33499,
        "2",33451,
        "1",0]},
{code}
when filtering on attribute "1" which has 0 results, not other results recieved.

Request
{code}
q=*:*&json.facet={facetForamount: {type : terms, field : amount, excludeTags : 
"tagForamount", mincount : 1, limit : 20 
}}&json.nl=map&indent=true&fq={!tag=tagForamount}(amount:1)&fq=content_type:PARENT&rows=0&wt=json
{code}
Response
{code}
{"response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[]},"facets":{"count":0}}
{code}

  was:
When requesting for a facet using the facet API on a specific field that doesnt 
 have results, the response arrives without any other facet.
for example:
you have the following fields under meta_i_example
{code}
"meta_i_example":[
        "-1",33743,
        "0",33739,
        "-2",33499,
        "2",33451,
        "1",0]},
{code}
when filtering on attribute "1" which has 0 results, not other results recieved.

Request
{code}
q=*:*&json.facet={facetForamount: {type : terms, field : amount, excludeTags : 
"tagForamount", mincount : 1, limit : 20 
}}&json.nl=map&indent=true&fq={!tag=tagForamount}(amount:1)&fq=content_type:PARENT&rows=0&wt=json
{code}
Response
{code}
{"response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[]},"facets":{"count":0}}
{code}


> JSON API facet doesnt return results when filtering on a facet with zero value
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-8293
>                 URL: https://issues.apache.org/jira/browse/SOLR-8293
>             Project: Solr
>          Issue Type: Bug
>          Components: Facet Module
>    Affects Versions: 5.3
>            Reporter: Yaniv Hemi
>            Priority: Critical
>              Labels: facet, json, jsonapi
>
> When requesting for a facet using the facet API on a specific field that 
> doesnt  have results, the response arrives without any other facet.
> for example:
> you have the following fields under meta_i_example
> {code}
> "example":[
>         "-1",33743,
>         "0",33739,
>         "-2",33499,
>         "2",33451,
>         "1",0]},
> {code}
> when filtering on attribute "1" which has 0 results, not other results 
> recieved.
> Request
> {code}
> q=*:*&json.facet={facetForamount: {type : terms, field : amount, excludeTags 
> : "tagForamount", mincount : 1, limit : 20 
> }}&json.nl=map&indent=true&fq={!tag=tagForamount}(amount:1)&fq=content_type:PARENT&rows=0&wt=json
> {code}
> Response
> {code}
> {"response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[]},"facets":{"count":0}}
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to