Filter query syntax

How to create a filter query for X-Axis aggregation
I know we are supposed to use ES-json syntax. But an example would help
if I have a field called "month" and value "jan"
how do I create a bucket for { "month" : "jan" } ?

You can use the Lucene query syntax (i.e. month: "jan").

It looks like specifying Elasticsearch query DSL is currently broken and I've filed an issue:

Broken in 6.3? I am using slightly older one 6.2.3!

I tried the suggested syntax. Here is what I get in the saved query? Is this because its broken?

"schema": "segment",
      "params": {
        "filters": [
            "input": {
              "query": "month : \"jan\""
            "label": ""
            "input": {
              "query": "month: \"feb\""

No, that looks correct, are you seeing the correct results in the visualization?

No result in visualization.

Could you take a screenshot that includes the visualization as well as the config for it?

Here it is - the last column is from blank filter


Hmm, could you try it without spaces? e.g. month:"jan"

no lock with space removed too...

Could you show me the JSON from one of the documents?

It worked!
The vales of month were differently coded.

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