Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[test]
- fn test_basic() {
- let dbname = "target/tests/basic";
- let _ = Index::drop(dbname);
- let mut batch = Batch::new();
- let mut index = Index::open(dbname, Some(OpenOptions::Create)).unwrap();
- let id1 = index.add(r#"{"State":"TX","City":"Dallas"}"#, &mut batch).unwrap();
- let id2 = index.add(r#"{"State":"TX","City":"Austin"}"#, &mut batch).unwrap();
- let id3 = index.add(r#"{"State":"NY","City":"New York"}"#, &mut batch).unwrap();
- index.flush(batch).unwrap();
- let mut results = index.query(r#"find order State, City"#, None).unwrap();
- }
Add Comment
Please, Sign In to add comment