2 unstable releases
Uses old Rust 2015
0.2.0 | Jul 29, 2016 |
---|---|
0.1.0 | Jul 29, 2016 |
#32 in #search-index
13KB
281 lines
kontex
Kontex is a full text search index.
Examples
use kontex::{Document, Index, Search};
use std::collections::HashMap;
let mut index = Index::new();
let mut attrs = HashMap::new();
attrs.insert("content", "Hello, World!");
attrs.insert("title", "Hello");
let document = Document::from_attributes(attrs);
let _ = index.add_document(document.clone());
let mut search: HashMap<&str, &str> = HashMap::new();
search.insert("*", "world");
let result = index.search(Search::from_attributes(search));
println!("{:?}", index);
assert_eq!(*result.first().unwrap(), document);
Status
This is under very active development so APIs may change or break without warning. If you need stable search indexing, I suggest you use something like Apache Lucene.