Return an heed error from the word_documents_count method

This commit is contained in:
Kerollmops 2021-02-18 14:59:37 +01:00
parent 09ca5d14c9
commit c2ffcc4bd1
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -356,11 +356,8 @@ impl Index {
/// Returns the number of documents ids associated with the given word,
/// it is much faster than deserializing the bitmap and getting the length of it.
pub fn word_documents_count(&self, rtxn: &RoTxn, word: &str) -> anyhow::Result<Option<u64>> {
self.word_docids
.remap_data_type::<RoaringBitmapLenCodec>()
.get(rtxn, word)
.map_err(Into::into)
pub fn word_documents_count(&self, rtxn: &RoTxn, word: &str) -> heed::Result<Option<u64>> {
self.word_docids.remap_data_type::<RoaringBitmapLenCodec>().get(rtxn, word)
}
/* documents */