Prefer using the word_docids db to create the words-fst

This commit is contained in:
Clément Renault 2020-09-06 10:23:56 +02:00
parent 4ca9472e02
commit c2405bcae2
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -260,8 +260,7 @@ impl Store {
let mut iter = self.sorter.into_iter()?; let mut iter = self.sorter.into_iter()?;
while let Some(result) = iter.next() { while let Some(result) = iter.next() {
let (key, val) = result?; let (key, val) = result?;
if let Some((&1, bytes)) = key.split_first() { if let Some((&WORD_DOCIDS_BYTE, word)) = key.split_first() {
let (word, _docid) = StrBEU32Codec::bytes_decode(bytes).unwrap();
// This is a lexicographically ordered word position // This is a lexicographically ordered word position
// we use the key to construct the words fst. // we use the key to construct the words fst.
builder.insert(word)?; builder.insert(word)?;