Reduce the DocumentId size from 64 to 32bits

This commit is contained in:
Kerollmops
2020-05-19 13:53:31 +02:00
parent 3bca31856d
commit 788e2202c9
12 changed files with 33 additions and 32 deletions

View File

@ -153,7 +153,7 @@ impl Main {
pub fn user_to_internal_id(self, reader: &heed::RoTxn<MainT>, userid: &str) -> ZResult<Option<DocumentId>> {
let user_ids = self.user_ids(reader)?;
Ok(user_ids.get(userid).map(DocumentId))
Ok(user_ids.get(userid).map(|id| DocumentId(id as u32)))
}
pub fn put_words_fst(self, writer: &mut heed::RwTxn<MainT>, fst: &fst::Set) -> ZResult<()> {