Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mindbeam/inverted-index-util

Utilities for implementing inverted indexes
https://github.com/mindbeam/inverted-index-util

Last synced: 13 days ago
JSON representation

Utilities for implementing inverted indexes

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/mindbeam/inverted-index-util.svg?branch=master)](https://travis-ci.org/mindbeam/inverted-index-util)

# inverted-index-util
This crate provides utilities for implementing inverted indexes

## Usage
```rust
use inverted_index_util::entity_list::insert_entity_mut;
use typenum::consts::U16;
let mut entity_list: Vec = Vec::new();

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

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