1 unstable release
0.0.1 | Nov 23, 2019 |
---|
#16 in #full-text
6KB
naro
Simple fulltext search library
map<word, > document -> words....
https://serde.rs/field-attrs.html
file.try_clone
struct Index {}
impl Field {
}
use naro::fields::{Text,NGram};
#[derive(Searchable)]
struct Document {
// id
id: u64,
#[naro(weight = 123)]
pub title: Text,
#[naro(weight = 12)]
pub content: Text,
#[naro(weight = 12)]
pub tag: NGram,
}
// Storage
struct Engine<T: Searchable + serde::Serialize> {
}
// Storage implementation
impl <T> Engine <T> {
pub fn new() -> Self {
}
pub fn add(&mut self, document: T) -> u32 {
}
pub fn delete(&mut self, id: u32) -> Error {
}
}
Storage
We will not write our custom storage, since that's not aim of this project.
We will use RocksDB as it looks like best fit.
author
Peter Vrba phonkee@phonkee.eu
Dependencies
~27MB
~558K SLoC