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

JSON API facet doesnt return facet with attribute that equals to 0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.3
    • Fix Version/s: 5.4
    • Component/s: Facet Module
    • Labels:

      Description

      regular facet returns "0",33739, but JSON Facet API returns all values and counts without "0".
      see the example:

      {
        "responseHeader":{
          "status":0,
          "QTime":9,
          "params":{
            "q":"*:*",
            "json.facet":"{\n\tfacetForMeta_i_interactionSentiment: {\t\t\ntype : terms, \n\t\tfield : Meta_i_interactionSentiment\n\t}\n}",
            "facet.field":"Meta_i_interactionSentiment",
            "indent":"true",
            "fq":["channel:TelcoDefaultChannel",
              "content_type:PARENT"],
            "rows":"0",
            "wt":"json",
            "facet":"true"}},
        "response":{"numFound":167857,"start":0,"maxScore":1.0,"docs":[]
        },
        "facet_counts":{
          "facet_queries":{},
          "facet_fields":{
            "Meta_i_interactionSentiment":[
              "-1",33743,
              "0",33739,
              "-2",33499,
              "2",33451,
              "1",33425]},
          "facet_dates":{},
          "facet_ranges":{},
          "facet_intervals":{},
          "facet_heatmaps":{}},
        "facets":{
          "count":167857,
          "facetForMeta_i_interactionSentiment":{
            "buckets":[{
                "val":-1,
                "count":33743},
              {
                "val":-2,
                "count":33499},
              {
                "val":2,
                "count":33451},
              {
                "val":1,
                "count":33425}]}}}
      

        Attachments

          Activity

            People

            • Assignee:
              yseeley@gmail.com Yonik Seeley
              Reporter:
              peroxidee Yaniv Hemi
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: