]>
git.proxmox.com Git - rustc.git/blob - vendor/elasticlunr-rs/examples/export_json.rs
1 use elasticlunr
::Index
;
6 let mut index
= Index
::new(&["title", "body"]);
10 "This Week in Rust 207",
11 "Hello and welcome to another issue of This Week in Rust!",
17 "This Week in Rust 206",
18 "Hello and welcome to another issue of This Week in Rust!",
21 let mut file
= File
::create("examples/out.json").unwrap();
22 file
.write_all(index
.to_json_pretty().as_bytes()).unwrap();