Use the CboRoaringBitmapCodec for the word pair proximity docids

This commit is contained in:
Kerollmops
2020-10-01 11:14:26 +02:00
committed by Clément Renault
parent 5a6a698e1d
commit d0c73564b1
4 changed files with 71 additions and 29 deletions

View File

@ -18,7 +18,7 @@ pub use self::search::{Search, SearchResult};
pub use self::criterion::{Criterion, default_criteria};
pub use self::heed_codec::{
RoaringBitmapCodec, BEU32StrCodec, StrStrU8Codec,
CsvStringRecordCodec, BoRoaringBitmapCodec,
CsvStringRecordCodec, BoRoaringBitmapCodec, CboRoaringBitmapCodec,
};
pub type FastMap4<K, V> = HashMap<K, V, BuildHasherDefault<FxHasher32>>;
@ -44,7 +44,7 @@ pub struct Index {
/// Maps a word and a document id (u32) to all the positions where the given word appears.
pub docid_word_positions: Database<BEU32StrCodec, BoRoaringBitmapCodec>,
/// Maps the proximity between a pair of words with all the docids where this relation appears.
pub word_pair_proximity_docids: Database<StrStrU8Codec, RoaringBitmapCodec>,
pub word_pair_proximity_docids: Database<StrStrU8Codec, CboRoaringBitmapCodec>,
/// Maps the document id to the document as a CSV line.
pub documents: Database<OwnedType<BEU32>, ByteSlice>,
}