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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 5.3
    • 5.4
    • Facet Module

    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

        1. SOLR-7922.patch
          4 kB
          Yonik Seeley

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: