From dd57b7fa3a12ad416dd8ec313569757e5d56d97d Mon Sep 17 00:00:00 2001 From: Pascal Seitz Date: Wed, 20 Dec 2023 23:38:46 +0800 Subject: [PATCH] term_freq in TermFrequencyRecorder untested PR to demonstrate #2285 --- src/postings/recorder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/postings/recorder.rs b/src/postings/recorder.rs index 767441f64..25aa4135a 100644 --- a/src/postings/recorder.rs +++ b/src/postings/recorder.rs @@ -213,7 +213,7 @@ impl Recorder for TermFrequencyRecorder { doc_id_and_tf.sort_unstable_by_key(|&(doc_id, _)| doc_id); for (doc_id, tf) in doc_id_and_tf { - serializer.write_doc(doc_id, tf, &[][..]); + serializer.write_doc(doc_id, 0, &[][..]); } } else { let mut prev_doc = 0; @@ -221,7 +221,7 @@ impl Recorder for TermFrequencyRecorder { let doc_id = prev_doc + delta_doc_id; prev_doc = doc_id; let term_freq = u32_it.next().unwrap_or(self.current_tf); - serializer.write_doc(doc_id, term_freq, &[][..]); + serializer.write_doc(doc_id, 0, &[][..]); } } }