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

Update table search boost scores #1313

Merged
merged 1 commit into from
Aug 21, 2023
Merged
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
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
Loading