From 9003bfdeea6fb43a9879719855ec87ebbbdfbd92 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Tue, 31 Mar 2026 09:19:57 -0700 Subject: [PATCH] Fine, I'll spin up the VM here. Good this got tested --- src/documents/search/_backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/documents/search/_backend.py b/src/documents/search/_backend.py index b2bacbd3b..563940ff9 100644 --- a/src/documents/search/_backend.py +++ b/src/documents/search/_backend.py @@ -498,8 +498,8 @@ class TantivyBackend: limit=offset + page_size, order_by_field=mapped_field, ) - # Field sorting: hits are bare DocAddress (no score) - all_hits = [(hit, 0.0) for hit in results.hits] + # Field sorting: hits are still (score, DocAddress) tuples; score unused + all_hits = [(hit[1], 0.0) for hit in results.hits] else: # Score-based search: hits are (score, doc_address) tuples results = searcher.search(final_query, limit=offset + page_size)