From 0ead4550e4e918698ac236cb72f87a9c8895f664 Mon Sep 17 00:00:00 2001 From: tianru zhou <61560998+UnbalancedShard@users.noreply.github.com> Date: Tue, 26 Jan 2021 14:19:12 -0800 Subject: [PATCH] fix: make column names searchable by lowercase (#85) * fix: make column names search case insensitive Signed-off-by: tianru zhou * replace tabs with spaces Signed-off-by: tianru zhou * update version number Signed-off-by: tianru zhou Co-authored-by: tianru zhou --- amundsen_common/models/index_map.py | 11 +++++++++++ setup.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/amundsen_common/models/index_map.py b/amundsen_common/models/index_map.py index 79c704b..efeb7c7 100644 --- a/amundsen_common/models/index_map.py +++ b/amundsen_common/models/index_map.py @@ -13,6 +13,16 @@ TABLE_INDEX_MAP = textwrap.dedent( """ { + "settings": { + "analysis": { + "normalizer": { + "column_names_normalizer": { + "type": "custom", + "filter": ["lowercase"] + } + } + } + }, "mappings":{ "table":{ "properties": { @@ -51,6 +61,7 @@ "fields": { "raw": { "type": "keyword" + "normalizer": "column_names_normalizer" } } }, diff --git a/setup.py b/setup.py index 2369b7d..ff8330d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='amundsen-common', - version='0.5.9', + version='0.5.10', description='Common code library for Amundsen', long_description=open('README.md').read(), long_description_content_type='text/markdown',