Skip to content

[BP] MB-64636 - Modified Weight for KNN Scorer#2130

Merged
metonymic-smokey merged 2 commits into7.6.x-couchbasefrom
trinity-score
Jan 13, 2025
Merged

[BP] MB-64636 - Modified Weight for KNN Scorer#2130
metonymic-smokey merged 2 commits into7.6.x-couchbasefrom
trinity-score

Conversation

@metonymic-smokey
Copy link
Contributor

@metonymic-smokey metonymic-smokey commented Jan 10, 2025

  1. Changed weight of a kNN query to 1 to allow the boost value to kick in when computing query score.
    Since the weight of only the kNN scorer is changed, this will not impact how boosting is calculated for other types of queries.

To reduce the kNN score relative to the FTS query score, set boost to <1.

  1. Added a unit test which demonstrates boost increasing scores even for pure kNN queries(kNN + match none query).

@metonymic-smokey metonymic-smokey changed the base branch from master to 7.6.x-couchbase January 10, 2025 05:04
@metonymic-smokey metonymic-smokey changed the title [BP] Modified Weight for KNN Scorer [BP] MB-64636 - Modified Weight for KNN Scorer Jan 10, 2025
@metonymic-smokey metonymic-smokey marked this pull request as ready for review January 10, 2025 05:05
@metonymic-smokey metonymic-smokey merged commit bd49319 into 7.6.x-couchbase Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants