mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-11 14:04:31 +01:00
Return an heed error from the word_documents_count method
This commit is contained in:
parent
09ca5d14c9
commit
c2ffcc4bd1
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user