15 releases (stable)

2.3.3 May 28, 2018
2.3.0 May 14, 2018
2.2.0 Apr 21, 2018
2.1.2 Mar 23, 2018
0.1.0 Nov 12, 2017

#1 in Database implementations

Download history 6628/week @ 2018-08-05 7518/week @ 2018-08-12 7527/week @ 2018-08-19 6924/week @ 2018-08-26 6086/week @ 2018-09-02 6101/week @ 2018-09-09 6233/week @ 2018-09-16 6218/week @ 2018-09-23 6626/week @ 2018-09-30 6456/week @ 2018-10-07 6165/week @ 2018-10-14 6855/week @ 2018-10-21 6502/week @ 2018-10-28

16,972 downloads per month
Used in 1 crate

MIT/Apache

112KB
4K SLoC

elasticlunr-rs

Build Status Documentation Crates.io

A partial port of elasticlunr.js to Rust. Intended to be used for generating compatible search indices.

Example

use std::fs::File;
use std::io::Write;
use elasticlunr::Index;

let mut index = Index::new(&["title", "body"]);
index.add_doc("1", &["This is a title", "This is body text!"]);
// Add more documents...
let mut file = File::create("out.json").unwrap();
file.write_all(index.to_json_pretty().as_bytes());

License

This repository is offered under the terms of the

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Includes code ported from elasticlunr.js Copyright (C) 2017 by Wei Song, used under license. See LICENSE-JS for details.

Includes stop word lists ported from stopwords-filter Copyright (C) 2012 David J. Brenes, used under license. See LICENSE-WORDS for details.

Dependencies

~4.5MB
~80K SLoC