0

I've created a Kibana Controls visualization (Options List with Multiselect and Dynamic Options enabled) on my Dashboard. The search only yields results when values are case sensitive. I've read that case sensitivity is dependent upon the property's tokenizer during ingest into elasticsearch - which makes sense.

Kibana Controls visualization

So I've configured my index with the following lowercase tokenizer:

"settings": {
    "number_of_shards": 1,
    "analysis": {
      "analyzer": {
        "lowercaseAnalyzer": {
          "tokenizer": "keyword",
          "filter": "lowercase"
        }
      }
    }
  }
...
"mappings": {
  "_source": {
    "enabled": true
  },
  "properties": {
    "schname": {
      "type": "text",
      "analyzer":"lowercaseAnalyzer",
      "fields": {
        "raw": {
          "type": "keyword"
        }
      }
    },
    ...

When I re-index my data, however, I see no change in the search behavior of the Controls visualization. It's still case sensitive. Could this be because, for schname, I'm using a multi-field? The Controls Visualization is configured to utilize the schname.raw field.

I've also tried tweaking my analyzer to the following with no avail.

"tokenizer": "whitespace",
"filter": [ "lowercase" ]

Admittedly, this is my first venture into analyzers, so I'm just trying to figure out where I'm going wrong.

littleK
  • 19,521
  • 30
  • 128
  • 188

1 Answers1

0

it looks like it should work on the schname field as that is where you put the lower case analyser. if you put it on the schname.raw field then you are going to need to use the exact case, as that's what a keyword mapping is - https://www.elastic.co/guide/en/elasticsearch/reference/7.14/keyword.html

there's also an issue around this - https://github.com/elastic/kibana/issues/50171

warkolm
  • 1,933
  • 1
  • 4
  • 12
  • That makes sense, although I only see schname.raw (vs. schname) as an available field for the Control. I wonder if it is limited to keyword fields? – littleK Aug 16 '21 at 22:47