# Kibana dropdown filter doesn't handle results containing a dash (-)

**URL:** <https://discuss.elastic.co/t/kibana-dropdown-filter-doesnt-handle-results-containing-a-dash/291994>\
**Category:** Kibana\
**Created:** [December 15, 2021, 2:24pm UTC](https://discuss.elastic.co/t/kibana-dropdown-filter-doesnt-handle-results-containing-a-dash/291994 "2021-12-15T14:24:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vpy](https://avatars.discourse-cdn.com/v4/letter/v/7ab992/32.png) [@vpy](https://discuss.elastic.co/u/vpy)\
**Post date:** [December 15, 2021, 2:24pm UTC](https://discuss.elastic.co/t/kibana-dropdown-filter-doesnt-handle-results-containing-a-dash/291994/1 "2021-12-15T14:24:31Z")

</div>

Hi

I would like to report a this Kibana canvas issue.

Let me first describe the test environment:  
The canvas contains a dropdown filter and a Data table.  
The kibana index is issued from syslog files. The main index fields are:

- host
- filename
- message

The dropdown filter allows the hostname to be selected with a very basic SQL command:

```auto
  essql query="SELECT host FROM \"linux-log\" GROUP BY host "
 | dropdownControl filterColumn="host" valueColumn="host" filterGroup="LinuxFilter"
 | render

```

The data table code is the following:

```auto
filters "LinuxFilter"
| essql 
  query="SELECT 
  \"@timestamp\" as \"Date / Time\",
  host,
  filename,
  message 
 FROM 
  \"linux-log\"
 "
| mapColumn "Date / Time" fn={getCell | formatdate "DD-MM-YYYY / HH:mm:ss"}
| table
| render containerStyle={containerStyle border="3px double #444444"}

```

Everything works fine with most of the hostnames.  
But as soon as a dash is included within the selected hostname, the data table output is empty.

**Note** : I experienced the same issue with both V7.12.1 and V7.16.1.

A similar issue was reported in Feb. 2020 but not relevant solution was posted.

Thank you for your help

Vincent

---

<div class="post-metadata">

**Author:** ![vpy](https://avatars.discourse-cdn.com/v4/letter/v/7ab992/32.png) [@vpy](https://discuss.elastic.co/u/vpy)\
**Post date:** [December 16, 2021, 9:13am UTC](https://discuss.elastic.co/t/kibana-dropdown-filter-doesnt-handle-results-containing-a-dash/291994/2 "2021-12-16T09:13:00Z")

</div>

Hi

I keep working on this issue and I made progress.

I added a DEBUG DATA object to get the JSON code.  
And this shows the 'term query' keyword is used by the canvas to process the request (when the dropdown select is not 'ANY').

Then, in the "Dev Tools", the issue can be easily now reproduced.

This following request will correctly display all the 'frodon' host rows.

```auto
GET /linux-log/_search
{
  "size" : 1000,
  "query" : {
    "term" : {
      "host" : {
        "value" : "frodon",
        "boost" : 1.0
      }
    }
  }
}

```

This following request will display no result (and of course index-log contains 'the-hobbit' host rows):

```auto
GET /linux-log/_search
{
  "size" : 1000,
  "query" : {
    "term" : {
      "host" : {
        "value" : "the-hobbit",
        "boost" : 1.0
      }
    }
  }
}

```

I'm afraid this issue can't be fixed. Because there is no way to change the JSON code generated by the canvas...

Any ideas ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 13, 2022, 9:13am UTC](https://discuss.elastic.co/t/kibana-dropdown-filter-doesnt-handle-results-containing-a-dash/291994/3 "2022-01-13T09:13:23Z")

</div>

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