Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8293

JSON API facet doesnt return results when filtering on a facet with zero value

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Invalid
    • Affects Version/s: 5.3
    • Fix Version/s: None
    • Component/s: Facet Module
    • Labels:

      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

      "example":[
              "-1",33743,
              "0",33739,
              "-2",33499,
              "2",33451,
              "1",0]},
      

      when filtering on attribute "1" which has 0 results, not other results recieved.

      Request

      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
      

      Response

      {"response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[]},"facets":{"count":0}}
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              peroxidee Yaniv Hemi
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: