From c2405bcae289479a3e3b8fa0db359f53b21a9c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sun, 6 Sep 2020 10:23:56 +0200 Subject: [PATCH] Prefer using the word_docids db to create the words-fst --- src/bin/indexer.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bin/indexer.rs b/src/bin/indexer.rs index 3deaa63f3..8bf5e5435 100644 --- a/src/bin/indexer.rs +++ b/src/bin/indexer.rs @@ -260,8 +260,7 @@ impl Store { let mut iter = self.sorter.into_iter()?; while let Some(result) = iter.next() { let (key, val) = result?; - if let Some((&1, bytes)) = key.split_first() { - let (word, _docid) = StrBEU32Codec::bytes_decode(bytes).unwrap(); + if let Some((&WORD_DOCIDS_BYTE, word)) = key.split_first() { // This is a lexicographically ordered word position // we use the key to construct the words fst. builder.insert(word)?;