From 4388be0b03eb3d8d1089f5d5278c13d2832e2044 Mon Sep 17 00:00:00 2001 From: Na Zhang Date: Thu, 21 Sep 2017 13:42:55 -0700 Subject: [PATCH] introduce customized analyzer for wherehows es index --- .../ELASTICSEARCH/index_mapping.json | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/wherehows-data-model/ELASTICSEARCH/index_mapping.json b/wherehows-data-model/ELASTICSEARCH/index_mapping.json index 2e928a93fe..fd862af762 100644 --- a/wherehows-data-model/ELASTICSEARCH/index_mapping.json +++ b/wherehows-data-model/ELASTICSEARCH/index_mapping.json @@ -1,4 +1,17 @@ { + "settings": { + "analysis": { + "analyzer": { + "keyword_analyzer": { + "type": "custom", + "tokenizer": "keyword", + "filter": [ + "lowercase" + ] + } + } + } + }, "mappings": { "metric": { "properties": { @@ -81,7 +94,7 @@ "tags": { "type": "string" }, - "urn": { + "metric_urn": { "type": "string" }, "wiki_url": { @@ -120,7 +133,8 @@ "type": "string" }, "name": { - "type": "string" + "type": "string", + "analyzer": "keyword_analyzer" }, "name_suggest": { "type": "completion", @@ -145,7 +159,8 @@ "type": "long" }, "urn": { - "type": "string" + "type": "string", + "analyzer": "keyword_analyzer" } } },