Skip to content

Commit

Permalink
update table search boost scores (pinterest#1313)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgopal492 authored and aidenprice committed Jan 3, 2024
1 parent d761d07 commit a8204ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions querybook/server/lib/elasticsearch/search_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _match_table_word_fields(fields):
# 'table_name', 'description', and 'column' are fields used by Table search
if field == "table_name":
search_fields.append("full_name^2")
search_fields.append("full_name_ngram")
search_fields.append("full_name_ngram^0.2")
elif field == "description":
search_fields.append("description")
elif field == "column":
Expand Down Expand Up @@ -95,7 +95,7 @@ def construct_tables_query(
"boost_mode": "sum",
"script_score": {
"script": {
"source": "doc['importance_score'].value * 10 + (doc['golden'].value ? 10 : 0)"
"source": "doc['importance_score'].value * 10 + (doc['golden'].value ? 50 : 0)"
}
},
}
Expand Down

0 comments on commit a8204ce

Please sign in to comment.