mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-18 17:11:15 +08: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,
|
/// 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.
|
/// 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>> {
|
pub fn word_documents_count(&self, rtxn: &RoTxn, word: &str) -> heed::Result<Option<u64>> {
|
||||||
self.word_docids
|
self.word_docids.remap_data_type::<RoaringBitmapLenCodec>().get(rtxn, word)
|
||||||
.remap_data_type::<RoaringBitmapLenCodec>()
|
|
||||||
.get(rtxn, word)
|
|
||||||
.map_err(Into::into)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* documents */
|
/* documents */
|
||||||
|
Loading…
Reference in New Issue
Block a user