Fix #611: ElasticSearch matches are case-sensitive (#617)

This commit is contained in:
Sriharsha Chintalapani 2021-09-29 17:43:09 -07:00 committed by GitHub
parent a514934f16
commit e84de1a310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 15 deletions

View File

@ -104,7 +104,7 @@ public class SearchResource {
@DefaultValue("10") @QueryParam("size") int size, @DefaultValue("10") @QueryParam("size") int size,
@Parameter(description = "Sort the search results by field, available fields to " + @Parameter(description = "Sort the search results by field, available fields to " +
"sort weekly_stats" + "sort weekly_stats" +
" , daily_stats, monthly_stats, last_updated_timestamp defaults to weekly_stats") " , daily_stats, monthly_stats, last_updated_timestamp")
@QueryParam("sort_field") String sortFieldParam, @QueryParam("sort_field") String sortFieldParam,
@Parameter(description = "Sort order asc for ascending or desc for descending, " + @Parameter(description = "Sort order asc for ascending or desc for descending, " +
"defaults to desc") "defaults to desc")

View File

@ -21,8 +21,7 @@ TABLE_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent(
"mappings":{ "mappings":{
"properties": { "properties": {
"table_name": { "table_name": {
"type":"text", "type":"text"
"analyzer": "keyword"
}, },
"schema": { "schema": {
"type":"text", "type":"text",
@ -34,10 +33,10 @@ TABLE_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent(
} }
}, },
"display_name": { "display_name": {
"type": "keyword" "type": "text"
}, },
"owner": { "owner": {
"type": "keyword" "type": "text"
}, },
"followers": { "followers": {
"type": "keyword" "type": "keyword"
@ -53,7 +52,7 @@ TABLE_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent(
"type": "keyword" "type": "keyword"
}, },
"column_names": { "column_names": {
"type":"keyword" "type":"text"
}, },
"column_descriptions": { "column_descriptions": {
"type": "text" "type": "text"
@ -71,7 +70,7 @@ TABLE_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent(
"type": "keyword" "type": "keyword"
}, },
"database": { "database": {
"type": "keyword" "type": "text"
}, },
"suggest": { "suggest": {
"type": "completion" "type": "completion"
@ -106,8 +105,7 @@ TOPIC_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent(
"mappings":{ "mappings":{
"properties": { "properties": {
"topic_name": { "topic_name": {
"type":"text", "type":"text"
"analyzer": "keyword"
}, },
"schema": { "schema": {
"type":"text", "type":"text",
@ -119,10 +117,10 @@ TOPIC_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent(
} }
}, },
"display_name": { "display_name": {
"type": "keyword" "type": "text"
}, },
"owner": { "owner": {
"type": "keyword" "type": "text"
}, },
"followers": { "followers": {
"type": "keyword" "type": "keyword"
@ -161,11 +159,10 @@ DASHBOARD_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent(
"mappings":{ "mappings":{
"properties": { "properties": {
"dashboard_name": { "dashboard_name": {
"type":"text", "type":"text"
"analyzer": "keyword"
}, },
"display_name": { "display_name": {
"type": "keyword" "type": "text"
}, },
"owner": { "owner": {
"type": "keyword" "type": "keyword"
@ -181,7 +178,7 @@ DASHBOARD_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent(
"type": "text" "type": "text"
}, },
"chart_names": { "chart_names": {
"type":"keyword" "type":"text"
}, },
"chart_descriptions": { "chart_descriptions": {
"type": "text" "type": "text"