mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-27 07:00:05 +01:00
Merge pull request #88 from meilisearch/heed-error-word-documents-count
Return an heed error from the word_documents_count method
This commit is contained in:
commit
e62157e896
@ -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