How to exclude doc_count value in result? Kibana Query

Hi,

I have a question, I am not sure if this is technically possible however. I want to exclude/not display the "doc_count:value" in my result.

Below is a snippet of my result

{
          "key_as_string" : "2020-06-04T00:00:00.000Z",
          "key" : 1591228800000,
          "doc_count" : 369748443,
          "cmtsId_list" : {
            "doc_count_error_upper_bound" : 459728,
            "sum_other_doc_count" : 368764459,
            "buckets" : [
              {
                "key" : "18ff3947d5c33c89ad946f0cd85e0ff14f28dcd0",
                "doc_count" : 338182
              },
              {
                "key" : "d9096c0979c4adf5d112ae6ea6f35e6a658525fa",
                "doc_count" : 338064
              },
              {
                "key" : "87abc3414726186173dab0435240834d31207d92",
                "doc_count" : 307738
              }
            ]
          },
          "numberof_cmtsId" : {
            "value" : 4134
          }
        },

Is it possible to remove the doc_count:value in my result ? I still want the "key:value" to show up

Below is what I am looking for

{
          "key_as_string" : "2020-06-04T00:00:00.000Z",
          "key" : 1591228800000,
          "doc_count" : 369748443,
          "cmtsId_list" : {
            "doc_count_error_upper_bound" : 459728,
            "sum_other_doc_count" : 368764459,
            "buckets" : [
              {
                "key" : "18ff3947d5c33c89ad946f0cd85e0ff14f28dcd0"
              },
              {
                "key" : "d9096c0979c4adf5d112ae6ea6f35e6a658525fa"
              },
              {
                "key" : "87abc3414726186173dab0435240834d31207d92"
              }
            ]
          },
          "numberof_cmtsId" : {
            "value" : 4134
          }
        },

Any inputs ? :slight_smile:

Hi @vdalvi,

This doesn't seem to be possible today. It seems to have been requested a few times already with a decision to keep the value in the result (elasticsearch/issues#17141 and elasticsearch/issues#7869).

Is there a use case you'd wish to not have this field displayed?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.