Visualization Filter

Hi,

I am trying to make a visualization in Kibana that has a filter in it. I decided to do a "script" filter that returns true if two of a documents fields are equal.

I can do the filter in the dev console no bother, but as soon as I try to filter the visualization, it just doesnt work.
It instead, displays all the data, even the data that should not match the filter.

My kibanaSavedObjectMeta.searchSourceJSON is as follows

{
  "index": "index1",
  "filter": {
    "script": {
      "script": {
        "inline": "doc['value1'] == doc['value2']"
      }
    }
  }
}

Regards

@Conall_Prendergast the filter should be an array

{
  "index": "index1",
  "filter": [{
    "script": {
      "script": {
        "inline": "doc['value1'] == doc['value2']"
      }
    }
  }]
}

@Brandon_Kobel Thanks a million. You're a god among men!

@Conall_Prendergast :blush:

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