Term query Kibana

I'm looking into a way to perform a term query straight from the search bar in Kibana. Found some stuff on this but last post is about a year old. I know I can then do this by editing the filter using the query DSL. When I use the defaults it is using a phrase query or a match but not a term query.

If you just input plain text you will get a match or phrase query.

However, you can leverage the KQL syntax to filter on specific terms. I'd recommend checking out the docs here on how to specify these queries: https://www.elastic.co/guide/en/kibana/current/kuery-query.html

Please explain a little bit more. I have been reading these docs but what ever combination I try, when I inspect the request I see either a match or a phrase query.

So using the KQL I tried:

field:value - > match
field:"value" -> phrase

Using the filters saying "field is value" also results in a match phrase. The same accounts for clicking the value from the results.

I need the term query for filtering on text analysed by the pathhierarchy tokenizer.

https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-pathhierarchy-tokenizer-examples.html

I'm not reproducing that effect. Mine is a bool query (not terms, like I mentioned before). Make sure you have KQL turned on:

Here was my query:

  "query": {
    "bool": {
      "must": [],
      "filter": [
        {
          "bool": {
            "should": [
              {
                "range": {
                  "@timestamp": {
                    "gte": "now",
                    "lte": "now",
                    "time_zone": "xxxxx"
                  }
                }
              }
            ],
            "minimum_should_match": 1
          }
        },
        {
          "range": {
            "@timestamp": {
              "format": "strict_date_optional_time",
              "gte": "2019-12-17T21:13:03.265Z",
              "lte": "2020-01-16T21:13:03.265Z"
            }
          }
        }
      ],
      "should": [],
      "must_not": []
    }
  },

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