---
title: "Apache Lucene"
description: "1 posts about Apache Lucene, summarised, each linking to the original."
---

# Apache Lucene
> 1 posts about Apache Lucene, summarised, each linking to the original.

## Articles

### [Same Query, Same Score: Consistent Ranking with StableTfl in Atlas Search](https://yomu.fyi/post/same-query-same-score-consistent-ranking-with-stabletfl-in-atlas-searc.md)
- Company: [MongoDB](https://yomu.fyi/company/mongodb.md)
- Published: Sep 25, 2026
- Type: Explainer

Paginated search in Atlas Search can show duplicate or skipped results across pages because BM25 scores drift between replicas due to changing corpus statistics. The usual workarounds like sticky routing or index snapshots require extra state and are cumbersome. The solution is StableTfl, a scoring function that uses only term frequency and document length, with term length as a proxy for rarity based on Zipf’s brevity law, eliminating corpus statistics and requiring no extra state. StableTfl is contributed to Apache Lucene and is available as a per-field similarity option in Atlas Search. Benchmarks on BEIR show StableTfl achieves 0.315 NDCG@10 compared to BM25’s 0.346, a 9% relative drop, making it suitable for paginated search, RAG pipelines, and multi-replica deployments where consistency matters more than peak relevance.
