#index #inverted #utils

inverted-index-util

Utilities for implementing an inverted index

3 releases

0.0.5 Mar 16, 2020
0.0.4 Mar 16, 2020
0.0.3 Mar 14, 2020
0.0.2 Mar 13, 2020
0.0.1 Mar 13, 2020

#101 in #util

MIT/Apache

9KB
147 lines

Build Status

inverted-index-util

This crate provides utilities for implementing inverted indexes

Usage

    use inverted_index_util::entity_list::insert_entity_mut;
    use typenum::consts::U16;
    let mut entity_list: Vec<u8> = Vec::new();

    insert_entity_mut::<U16>(&mut entity_list, b"aaaaaaaaaaaaaaaa");
    insert_entity_mut::<U16>(&mut entity_list, b"cccccccccccccccc");
    insert_entity_mut::<U16>(&mut entity_list, b"aaaaaaaaaaaaaaaa");
    insert_entity_mut::<U16>(&mut entity_list, b"bbbbbbbbbbbbbbbb");

    assert_eq!(
        &entity_list[..],
        &b"aaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbcccccccccccccccc"[..]
    );

lib.rs:

inverted-index-util

This crate provides utilities for implementing inverted indexes

Usage

    use inverted_index_util::entity_list::insert_entity_mut;
    use typenum::consts::U16;
    let mut entity_list: Vec<u8> = Vec::new();

    insert_entity_mut::<U16>(&mut entity_list, b"aaaaaaaaaaaaaaaa");
    insert_entity_mut::<U16>(&mut entity_list, b"cccccccccccccccc");
    insert_entity_mut::<U16>(&mut entity_list, b"aaaaaaaaaaaaaaaa");
    insert_entity_mut::<U16>(&mut entity_list, b"bbbbbbbbbbbbbbbb");

    assert_eq!(
        &entity_list[..],
        &b"aaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbcccccccccccccccc"[..]
    );

Dependencies

~155KB