Skip to content

Commit

Permalink
provide real list of best docs
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Dec 28, 2024
1 parent ea97b5f commit 097568e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/services/fetch_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ def score_snapshot snapshot, try
{ id: snapshot_doc.doc_id, rating: doc_ratings[snapshot_doc.doc_id] }
end

best_docs = []
best_docs = snapshot_query.query.ratings.map do |rating|
{ id: rating.doc_id, rating: rating.rating }
end

# docs = [
# { id: 1, value: 10, rating: 3 },
Expand Down

0 comments on commit 097568e

Please sign in to comment.