Question: BM25 Document Length Normalization in FulltextIndex

Aperta
#11,620 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
15/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
search

Direzione di ricerca

This is a question about the rationale and measurements behind the u16 document length norm choice, with PR #11169 linked for context. Read that PR and its cited evaluation to find why u16 was selected over u8 and how the reported 4.5% change in long-document top-10 results was measured. Done means providing those explanations; the issue does not request a code change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi, currently I'm learning about BM25 implementations in different search engines, and how the document length norm affects search quality and performance.

I noticed that both Lucene and Tantivy store norms in one byte. The Tantivy docs say this saves space and also lets them calculate some scoring values ahead of time and store them in a small lookup table.

Apart from compression, this scale also makes it possible to precompute computationally expensive functions of the fieldnorm in a very short array.

I also read PR #11169, and learned that Qdrant has already tested the u8 norm plan:

A Lucene-style u8 norm kept nDCG@10 but changed up to 4.5% of top-10 results on long documents.

Qdrant chose a more precise u16 encoding, which stores document lengths of up to 8,192 tokens exactly.

I'm curious about why Qdrant made this choice, because it's different from others. Could you share more knowledge about these points?

  • What's the main reasons for choosing u16 over u8? Is it search quality, performance, or resource usage?
  • In PR #11169, I'm curious about the statement changed up to 4.5% of top-10 results on long documents. I want to get more information about how it was measured.

Thanks!

Lingua principale
Rust
Stelle
35.7k
Fork
2.8k
Merge medio
1g 17h
PR unite (30g)
239

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di qdrant/qdrant

Tutte le issue di qdrant/qdrant

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.