Skip to content

Commit

Permalink
Remove LTR debug values
Browse files Browse the repository at this point in the history
These could be viewed in finder pages by appending `&debug_score=1` to the query string.

Finder-frontend attempts to access these defensively, so they are safe to remove.

[Learning to rank is being removed since this change](#2905)
  • Loading branch information
sihugh committed May 14, 2024
1 parent f295032 commit 5726b69
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/search/presenters/result_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ def add_debug_values(result)
# debugging is requested, so it's nicer to be explicit about what score
# it is.
result[:es_score] = raw_result["_score"]
# LearnToRank generated values
if RelevanceHelpers.ltr_enabled?
result[:model_score] = raw_result["model_score"]
result[:original_rank] = raw_result["original_rank"]
result[:combined_score] = raw_result["combined_score"]
end

result[:_id] = raw_result["_id"]

Expand Down

0 comments on commit 5726b69

Please sign in to comment.