-
Notifications
You must be signed in to change notification settings - Fork 220
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
fix: boost table score for exact match when searching table #1097
Conversation
if dot_index == -1: | ||
return None, keywords | ||
|
||
return keywords[:dot_index], keywords[dot_index + 1 :] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is autoformatted?
keywords[dot_index + 1:]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
if table_schema: | ||
filters.append(["schema", table_schema]) | ||
|
||
should_clause = _match_table_phrase_queries(fields, keywords) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't seem like should_clause need to be between the two if statements, can you move it to top?
### [0.45.1](https://github.expedia.biz/eg-analytics-platform/querybook/compare/0.45.0...0.45.1) (2022-12-09) ### Bug Fixes * boost table score for exact match when searching table (pinterest#1097) ([d75c1d1](https://github.expedia.biz/eg-analytics-platform/querybook/commit/d75c1d1d7089843465f6ecb0a6eb26b67b43c241)) * Keep table search default sort by name ([def3a0c](https://github.expedia.biz/eg-analytics-platform/querybook/commit/def3a0c9562c992d69db00185c7438d77980ebd2)) * notify_user need to accept user not uid (pinterest#1095) ([8b5b78f](https://github.expedia.biz/eg-analytics-platform/querybook/commit/8b5b78faa35bb2f6dfe7ebef7b3807af4befc3d3)) * remove python-dev from dockerfile build (pinterest#1098) ([12520df](https://github.expedia.biz/eg-analytics-platform/querybook/commit/12520df94c9a1543d9a6e726da4c009874ea8e5f)) * remove the edge when the node is deleted in dag exporter (pinterest#1089) ([d945a68](https://github.expedia.biz/eg-analytics-platform/querybook/commit/d945a68c92269a8f72a7b3331c2b186e2fcdb378)) * sidebar search should use relevance instead of alphabetical (pinterest#1096) ([a18cc93](https://github.expedia.biz/eg-analytics-platform/querybook/commit/a18cc93b49674b0d923ee32b724942cf194ad629))
The previous tuning of https://github.com/pinterest/querybook/pull/631/files will boost score for all phrase match, not limited to exact match. e.g.
query:
default.hello_world
candidate 1:
default.hello_world
candidate 2:
default.hello_world_v2
both candidate 1 and 2 will have the phrase match, while candidate 1 is the exact match.
This change will boost another score for the exact match of candidate 1.