Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed colums to column_names #28

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions search/search_service/proxy/es_proxy_v2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions search/tests/unit/proxy/v2_1/fixtures_v2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
},
{
"match": {
"columns.general": {
"column_names.general": {
"query": "mock_table",
"fuzziness": "AUTO",
"boost": 2,
Expand Down Expand Up @@ -475,7 +475,7 @@
},
"highlight": {
"name": ["<em>mock</em>_table_1"],
"columns.general": [
"column_names.general": [
"<em>mock</em>_col_1",
"<em>mock</em>_col_2",
"<em>mock</em>_col_3",
Expand Down
2 changes: 1 addition & 1 deletion search/tests/unit/proxy/v2_1/test_es_proxy_v2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading