LoginSignup
11
11

More than 5 years have passed since last update.

Kibana4でnot analyzedなFieldに対してフィルタをかけたいときの注意点

Last updated at Posted at 2015-05-19

Kibana4ではフィルタをかけるとき、query_string queryを投げています。

このquery_string queryのデフォルトの挙動では、クエリ文字列を全て小文字に変換して検索するという仕様があります。

そのため、特にnot analyzedのような大文字がインデックスされているフィールドに対しては、クエリ文字列上で明示した大文字の部分がヒットしない、という事が起きます。

この挙動を防ぎ、記述した通りのクエリ文字列で検索するためkibana4では、
Settings > Advanced > query:queryString:options

に対して以下の設定を追記するといいでしょう。

デフォルト:
json:default
{ "analyze_wildcard": true }

追記後:
json:lowercase_expanded_terms_false
{ "analyze_wildcard": true , "lowercase_expanded_terms" : false}

参考:
https://twitter.com/aya_eiya/status/600533055774687232
https://www.elastic.co/guide/en/elasticsearch/reference/1.x/query-dsl-query-string-query.html

11
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
11