You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FTS: rows with equal _score come back in an order that changes between calls and processes; a limit inside a tie keeps arbitrary rows #4516
Index: inverted (FTS) index, simple tokenizer, Dutch stemming, stop words removed, with_position=False, one segment, about 10.14 M documents, no unindexed rows. The table version did not change during any of the runs below.
Run it three times in one process, then once each in fresh processes, and compare the row ids inside groups of rows with equal _score.
Observed over 50 queries
Every difference falls inside a group of rows with equal _score. No score value changes.
Which rows come back changes only where such a group straddles limit.
The first call in a process differs from the later calls, which agree with each other (39 of 50 queries).
Warm results match across processes only with LANCE_CPU_THREADS=1: 25 of 25 queries, against 3 of 50 at two threads. The first call in a process varies even then.
Inside a tie, rows are not ordered by _rowid.
Ask
A deterministic tie-break before the top-k cut (for example by row address), or documentation that the order inside a tie is unspecified.
Related
RRFReranker ranks rows by their position in each list (enumerate(ids, 1) in rerankers/rrf.py). So hybrid results inherit this: tied FTS rows get distinct fused scores in arrival order. We worked around that side by putting each list in (score, id) order before fusing.
Caveat: this was seen on a private table and has not been reduced to synthetic data yet.
This looks like the same root cause as lance-format/lance#9132, where results with the same score can get skipped or duplicated across pages. There's an open fix in lance-format/lance#7846 that breaks ties with (score DESC, row_id ASC) in the BM25 top-k collector, similar to Lucene. It still needs a rebase and has an open review. Once it lands, the tied rows would also arrive in a stable order for the RRF reranker.
Activity
ahlag commentedon Oct 12, 2026
This looks like the same root cause as lance-format/lance#9132, where results with the same score can get skipped or duplicated across pages. There's an open fix in lance-format/lance#7846 that breaks ties with (score DESC, row_id ASC) in the BM25 top-k collector, similar to Lucene. It still needs a rebase and has an open review. Once it lands, the tied rows would also arrive in a stable order for the RRF reranker.