mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-07 17:42:55 +00:00
first commit
This commit is contained in:
15
tests/core.rs
Normal file
15
tests/core.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
extern crate parici;
|
||||
extern crate itertools;
|
||||
|
||||
use parici::core::DocId;
|
||||
use parici::core::postings::{VecPostings, intersection};
|
||||
use parici::core::postings::Postings;
|
||||
|
||||
#[test]
|
||||
fn test_intersection() {
|
||||
let left = VecPostings::new(vec!(1, 3, 9));
|
||||
let right = VecPostings::new(vec!(3, 4, 9, 18));
|
||||
let inter = intersection(&left, &right);
|
||||
let vals: Vec<DocId> = inter.iter().collect();
|
||||
itertools::assert_equal(vals, vec!(3, 9));
|
||||
}
|
||||
Reference in New Issue
Block a user