octopus_query

Crates.iooctopus_query
lib.rsoctopus_query
version0.1.0
sourcesrc
created_at2020-03-07 08:36:22.710741
updated_at2020-03-07 08:36:22.710741
descriptionquery engine for arrays of integers (scoring only idf at the moment), supports AND/OR/DisMax/Constant queries
homepage
repositoryhttps://github.com/jackdoe/octopus_query
max_upload_size
id216275
size18,114
borislav nikolov (jackdoe)

documentation

README

octopus - query arrays of integers

octopus is a query engine for arrays of integers (scoring only idf at the moment), supports AND/OR/DisMax/Constant queries,

Example:

let queries: &mut [&mut dyn Query] =
    &mut [&mut Term::new(1, &[1, 2, 3]), &mut Term::new(1, &[1, 7, 9])];
let mut or = Or::new(queries);

let queries: &mut [&mut dyn Query] = &mut [
    &mut Term::new(1, &[1, 2, 7]),
    &mut Term::new(1, &[1, 2, 4, 5, 7, 9]),
    &mut or,
];
let mut and = And::new(queries);

while and.next() != NO_MORE {
    println!("doc: {}, score: {}", and.doc_id(), and.score());
}

Commit count: 14

cargo fmt