JSON Query DSL Support in Kibana Visualize Filters

Hi all:

I have found it periodically difficult to specify visualization filters in the stringy form (especially with respect to negation cases, e.g. not vs NOT).

In the Discover view, I can see my filter expression in DSL syntax. Can filters be provided in this way to the Visualize designer? Here's a GIF of me trying and failing :slight_smile:

Thanks,

Chris

You're on the right track! What you paste inside there should be anything inside the query portion. For example, if the query DSL says something like

{
  "query": {
    "match": {
      "activity.source.keyword": {
        "query": "Domain",
        "type": "phrase"
      }
    }
  }
}

Then you'd want to copy/paste just this part:

  {
    "match": {
      "activity.source.keyword": {
        "query": "Domain",
        "type": "phrase"
      }
    }
  }

Another thing to keep in mind, I believe the "type": "phrase" query was deprecated or removed, so you might have to change your query to something like this:

  {
    "match_phrase": {
      "activity.source.keyword":  "Domain"
    }
  }
1 Like

awesome, thx! cant wait to try it!

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