From 93214657cbb9b807b40020a2c9d8f410d2911ddc Mon Sep 17 00:00:00 2001 From: Drew Bittenbender Date: Tue, 14 Nov 2023 19:11:29 +0000 Subject: [PATCH] changed colums to column_names --- search/search_service/proxy/es_proxy_v2_1.py | 6 +++--- search/tests/unit/proxy/v2_1/fixtures_v2_1.py | 4 ++-- search/tests/unit/proxy/v2_1/test_es_proxy_v2_1.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/search/search_service/proxy/es_proxy_v2_1.py b/search/search_service/proxy/es_proxy_v2_1.py index 9dc9c94999..850d8dfb3f 100644 --- a/search/search_service/proxy/es_proxy_v2_1.py +++ b/search/search_service/proxy/es_proxy_v2_1.py @@ -49,7 +49,7 @@ class ElasticsearchProxyV2_1(ElasticsearchProxyV2): 'tag': 'tags.keyword', 'schema': 'schema.keyword', 'table': 'name.keyword', - 'column': 'columns.keyword', + 'column': 'column_names.keyword', 'database': 'database.keyword', 'cluster': 'cluster.keyword', } @@ -180,7 +180,7 @@ def _build_must_query(self, resource: Resource, query_term: str) -> List[Q]: ] if resource == Resource.TABLE: - columns_subfield = 'columns.general' + columns_subfield = 'column_names.general' should_clauses.extend([ Match(schema={ "query": query_term, @@ -323,7 +323,7 @@ def _search_highlight(self, type=DEFAULT_HIGHLIGHTER, number_of_fragments=0) if resource == Resource.TABLE: - search = search.highlight('columns.general', + search = search.highlight('column_names.general', type=DEFAULT_HIGHLIGHTER, number_of_fragments=10, order='score') diff --git a/search/tests/unit/proxy/v2_1/fixtures_v2_1.py b/search/tests/unit/proxy/v2_1/fixtures_v2_1.py index 08ea1784ab..810804eef7 100644 --- a/search/tests/unit/proxy/v2_1/fixtures_v2_1.py +++ b/search/tests/unit/proxy/v2_1/fixtures_v2_1.py @@ -119,7 +119,7 @@ }, { "match": { - "columns.general": { + "column_names.general": { "query": "mock_table", "fuzziness": "AUTO", "boost": 2, @@ -475,7 +475,7 @@ }, "highlight": { "name": ["mock_table_1"], - "columns.general": [ + "column_names.general": [ "mock_col_1", "mock_col_2", "mock_col_3", diff --git a/search/tests/unit/proxy/v2_1/test_es_proxy_v2_1.py b/search/tests/unit/proxy/v2_1/test_es_proxy_v2_1.py index 2e2354fa58..2282beb8d6 100644 --- a/search/tests/unit/proxy/v2_1/test_es_proxy_v2_1.py +++ b/search/tests/unit/proxy/v2_1/test_es_proxy_v2_1.py @@ -93,7 +93,7 @@ def test_search_highlight(self) -> None: "type": "fvh", "number_of_fragments": 0, }, - "columns.general": { + "column_names.general": { "type": "fvh", "number_of_fragments": 10, "order": "score",