├── .gitignore ├── Cargo.toml ├── src └── main.rs └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "libgen-search" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | serde = { version = "1.0", features = ["derive"] } 8 | serde_with = "2.0" 9 | tantivy = "0.18" 10 | cang-jie = "0.14" 11 | jieba-rs = { version = "0.6", features = ["default-dict"] } 12 | csv = "1.1" 13 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use cang_jie::CangJieTokenizer; 2 | use cang_jie::TokenizerOption; 3 | use cang_jie::CANG_JIE; 4 | use jieba_rs::Jieba; 5 | use serde::{Deserialize, Serialize}; 6 | use serde_with::serde_as; 7 | use serde_with::{DefaultOnError, DefaultOnNull}; 8 | use std::env; 9 | use std::sync::Arc; 10 | use std::{fs::File, io::BufReader}; 11 | use tantivy::collector::TopDocs; 12 | use tantivy::query::QueryParser; 13 | 14 | #[macro_use] 15 | extern crate tantivy; 16 | use tantivy::schema::*; 17 | use tantivy::Index; 18 | 19 | #[serde_as] 20 | #[derive(Debug, Default, Serialize, Deserialize)] 21 | pub struct Item { 22 | title: String, 23 | #[serde_as(deserialize_as = "DefaultOnNull")] 24 | author: String, 25 | #[serde_as(deserialize_as = "DefaultOnNull")] 26 | description: String, 27 | #[serde_as(deserialize_as = "DefaultOnError")] 28 | year: u64, 29 | #[serde_as(deserialize_as = "DefaultOnNull")] 30 | publisher: String, 31 | #[serde_as(deserialize_as = "DefaultOnError")] 32 | page: u64, 33 | #[serde_as(deserialize_as = "DefaultOnNull")] 34 | language: String, 35 | filesize: u64, 36 | extension: String, 37 | md5: String, 38 | ipfs_cid: String, 39 | } 40 | 41 | impl From<(Schema, Document)> for Item { 42 | fn from((schema, doc): (Schema, Document)) -> Self { 43 | macro_rules! get_field_text { 44 | ($field:expr) => { 45 | doc.get_first(schema.get_field($field).unwrap()) 46 | .unwrap() 47 | .as_text() 48 | .unwrap_or_default() 49 | .to_owned() 50 | }; 51 | } 52 | 53 | macro_rules! get_field_u64 { 54 | ($field:expr) => { 55 | doc.get_first(schema.get_field($field).unwrap()) 56 | .unwrap() 57 | .as_u64() 58 | .unwrap_or_default() 59 | }; 60 | } 61 | 62 | Item { 63 | title: get_field_text!("title"), 64 | author: get_field_text!("author"), 65 | // description: get_field_text!("description"), 66 | description: "".to_string(), 67 | year: get_field_u64!("year"), 68 | publisher: get_field_text!("publisher"), 69 | // page: get_field_u64!("page"), 70 | page: 0, 71 | language: get_field_text!("language"), 72 | // filesize: get_field_u64!("filesize"), 73 | filesize: 0, 74 | extension: get_field_text!("extension"), 75 | // md5: get_field_text!("md5"), 76 | md5: "".to_string(), 77 | ipfs_cid: get_field_text!("ipfs_cid"), 78 | } 79 | } 80 | } 81 | 82 | fn index() { 83 | let text_indexing = TextFieldIndexing::default() 84 | .set_tokenizer(CANG_JIE) 85 | .set_index_option(IndexRecordOption::WithFreqsAndPositions); 86 | let text_options = TextOptions::default() 87 | .set_indexing_options(text_indexing) 88 | .set_stored(); 89 | 90 | let mut schema_builder = Schema::builder(); 91 | let title = schema_builder.add_text_field("title", text_options.clone()); 92 | // let description = schema_builder.add_text_field("description", text_options.clone()); 93 | let author = schema_builder.add_text_field("author", text_options.clone()); 94 | let publisher = schema_builder.add_text_field("publisher", text_options.clone()); 95 | let language = schema_builder.add_text_field("language", TEXT | STORED); 96 | let year = schema_builder.add_u64_field("year", STORED); 97 | // let page = schema_builder.add_u64_field("page", STORED); 98 | // let filesize = schema_builder.add_u64_field("filesize", STORED); 99 | let extension = schema_builder.add_text_field("extension", STORED); 100 | // let md5 = schema_builder.add_text_field("md5", STORED); 101 | let ipfs_cid = schema_builder.add_text_field("ipfs_cid", STORED); 102 | let schema = schema_builder.build(); 103 | 104 | // index 105 | let index = Index::create_in_dir("index", schema.clone()).unwrap(); 106 | 107 | let tokenizer = CangJieTokenizer { 108 | worker: Arc::new(Jieba::new()), 109 | option: TokenizerOption::Unicode, 110 | }; 111 | index.tokenizers().register(CANG_JIE, tokenizer); 112 | 113 | let mut writer = index.writer(10 * 1024 * 1024 * 1024).unwrap(); 114 | 115 | let file = File::open("../search.csv").unwrap(); 116 | let reader = BufReader::new(file); 117 | 118 | let mut rdr = csv::ReaderBuilder::new() 119 | .has_headers(false) 120 | .from_reader(reader); 121 | 122 | for result in rdr.deserialize::() { 123 | match result { 124 | Ok(item) => { 125 | if let Err(err) = writer.add_document(doc!( 126 | title => item.title, 127 | // description => item.description, 128 | author => item.author, 129 | publisher => item.publisher, 130 | language => item.language, 131 | year => item.year, 132 | // page => item.page, 133 | // filesize => item.filesize, 134 | extension => item.extension, 135 | // md5 => item.md5, 136 | ipfs_cid => item.ipfs_cid, 137 | )) { 138 | println!("{err}"); 139 | } 140 | } 141 | Err(err) => { 142 | println!("{err}"); 143 | } 144 | } 145 | } 146 | 147 | writer.commit().unwrap(); 148 | } 149 | 150 | fn main() { 151 | // index(); 152 | 153 | let text_indexing = TextFieldIndexing::default() 154 | .set_tokenizer(CANG_JIE) 155 | .set_index_option(IndexRecordOption::WithFreqsAndPositions); 156 | let text_options = TextOptions::default() 157 | .set_indexing_options(text_indexing) 158 | .set_stored(); 159 | 160 | let mut schema_builder = Schema::builder(); 161 | let title = schema_builder.add_text_field("title", text_options.clone()); 162 | // let description = schema_builder.add_text_field("description", text_options.clone()); 163 | let author = schema_builder.add_text_field("author", text_options.clone()); 164 | let publisher = schema_builder.add_text_field("publisher", text_options.clone()); 165 | let language = schema_builder.add_text_field("language", text_options.clone()); 166 | let year = schema_builder.add_u64_field("year", STORED); 167 | // let page = schema_builder.add_u64_field("page", STORED); 168 | // let filesize = schema_builder.add_u64_field("filesize", STORED); 169 | let extension = schema_builder.add_text_field("extension", STRING | STORED); 170 | // let md5 = schema_builder.add_text_field("md5", STRING | STORED); 171 | let ipfs_cid = schema_builder.add_text_field("ipfs_cid", STRING | STORED); 172 | let schema = schema_builder.build(); 173 | 174 | // search 175 | let query: Vec = env::args().collect(); 176 | if query.len() < 2 { 177 | println!("search [BOOK | AUTHOR]"); 178 | return; 179 | } 180 | 181 | let index = Index::open_in_dir("index").unwrap(); 182 | let tokenizer = CangJieTokenizer { 183 | worker: Arc::new(Jieba::new()), 184 | option: TokenizerOption::Unicode, 185 | }; 186 | index.tokenizers().register(CANG_JIE, tokenizer); 187 | 188 | let reader = index.reader().unwrap(); 189 | let searcher = reader.searcher(); 190 | 191 | let query_parser = QueryParser::for_index(&index, vec![title, author]); 192 | 193 | let query = query_parser.parse_query(query[1].as_str()).unwrap(); 194 | 195 | let top_docs = searcher.search(&query, &TopDocs::with_limit(50)).unwrap(); 196 | 197 | for (_, doc_address) in top_docs { 198 | let doc = searcher.doc(doc_address).unwrap(); 199 | let item: Item = (schema.clone(), doc).into(); 200 | println!( 201 | "/ipfs/{}\t{}\t{}\t{}\t [{}] <{}> {{{}}}", 202 | item.ipfs_cid, 203 | item.extension, 204 | item.language, 205 | item.year, 206 | item.title, 207 | item.author, 208 | item.publisher, 209 | ); 210 | } 211 | } 212 | 213 | #[test] 214 | fn test_csv_der() { 215 | let file = File::open("../search.csv").unwrap(); 216 | let reader = BufReader::new(file); 217 | 218 | let mut rdr = csv::ReaderBuilder::new() 219 | .has_headers(false) 220 | .from_reader(reader); 221 | for result in rdr.records() { 222 | if let Err(err) = result { 223 | println!("{err:?}"); 224 | break; 225 | } 226 | } 227 | println!("{:?}", rdr.position()); 228 | } 229 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ahash" 7 | version = "0.7.6" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 10 | dependencies = [ 11 | "getrandom", 12 | "once_cell", 13 | "version_check", 14 | ] 15 | 16 | [[package]] 17 | name = "aho-corasick" 18 | version = "0.7.19" 19 | source = "registry+https://github.com/rust-lang/crates.io-index" 20 | checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" 21 | dependencies = [ 22 | "memchr", 23 | ] 24 | 25 | [[package]] 26 | name = "android_system_properties" 27 | version = "0.1.5" 28 | source = "registry+https://github.com/rust-lang/crates.io-index" 29 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 30 | dependencies = [ 31 | "libc", 32 | ] 33 | 34 | [[package]] 35 | name = "async-trait" 36 | version = "0.1.58" 37 | source = "registry+https://github.com/rust-lang/crates.io-index" 38 | checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" 39 | dependencies = [ 40 | "proc-macro2", 41 | "quote", 42 | "syn", 43 | ] 44 | 45 | [[package]] 46 | name = "autocfg" 47 | version = "1.1.0" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 50 | 51 | [[package]] 52 | name = "base64" 53 | version = "0.13.1" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 56 | 57 | [[package]] 58 | name = "bitflags" 59 | version = "1.3.2" 60 | source = "registry+https://github.com/rust-lang/crates.io-index" 61 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 62 | 63 | [[package]] 64 | name = "bitpacking" 65 | version = "0.8.4" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | checksum = "a8c7d2ac73c167c06af4a5f37e6e59d84148d57ccbe4480b76f0273eefea82d7" 68 | dependencies = [ 69 | "crunchy", 70 | ] 71 | 72 | [[package]] 73 | name = "bstr" 74 | version = "0.2.17" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" 77 | dependencies = [ 78 | "lazy_static", 79 | "memchr", 80 | "regex-automata", 81 | "serde", 82 | ] 83 | 84 | [[package]] 85 | name = "bumpalo" 86 | version = "3.11.1" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" 89 | 90 | [[package]] 91 | name = "byteorder" 92 | version = "1.4.3" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 95 | 96 | [[package]] 97 | name = "cang-jie" 98 | version = "0.14.0" 99 | source = "registry+https://github.com/rust-lang/crates.io-index" 100 | checksum = "508a04d2134fbe72fcc89a5c1973a1a86451a3b3493df8b7bb61a6088d5ba08c" 101 | dependencies = [ 102 | "jieba-rs", 103 | "log", 104 | "tantivy", 105 | ] 106 | 107 | [[package]] 108 | name = "cc" 109 | version = "1.0.76" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | checksum = "76a284da2e6fe2092f2353e51713435363112dfd60030e22add80be333fb928f" 112 | 113 | [[package]] 114 | name = "cedarwood" 115 | version = "0.4.6" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "6d910bedd62c24733263d0bed247460853c9d22e8956bd4cd964302095e04e90" 118 | dependencies = [ 119 | "smallvec", 120 | ] 121 | 122 | [[package]] 123 | name = "census" 124 | version = "0.4.1" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "0fafee10a5dd1cffcb5cc560e0d0df8803d7355a2b12272e3557dee57314cb6e" 127 | 128 | [[package]] 129 | name = "cfg-if" 130 | version = "1.0.0" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 133 | 134 | [[package]] 135 | name = "chrono" 136 | version = "0.4.22" 137 | source = "registry+https://github.com/rust-lang/crates.io-index" 138 | checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" 139 | dependencies = [ 140 | "iana-time-zone", 141 | "num-integer", 142 | "num-traits", 143 | "serde", 144 | "winapi", 145 | ] 146 | 147 | [[package]] 148 | name = "codespan-reporting" 149 | version = "0.11.1" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 152 | dependencies = [ 153 | "termcolor", 154 | "unicode-width", 155 | ] 156 | 157 | [[package]] 158 | name = "combine" 159 | version = "4.6.6" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" 162 | dependencies = [ 163 | "memchr", 164 | ] 165 | 166 | [[package]] 167 | name = "core-foundation-sys" 168 | version = "0.8.3" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 171 | 172 | [[package]] 173 | name = "crc32fast" 174 | version = "1.3.2" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 177 | dependencies = [ 178 | "cfg-if", 179 | ] 180 | 181 | [[package]] 182 | name = "crossbeam-channel" 183 | version = "0.5.6" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" 186 | dependencies = [ 187 | "cfg-if", 188 | "crossbeam-utils", 189 | ] 190 | 191 | [[package]] 192 | name = "crossbeam-deque" 193 | version = "0.8.2" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" 196 | dependencies = [ 197 | "cfg-if", 198 | "crossbeam-epoch", 199 | "crossbeam-utils", 200 | ] 201 | 202 | [[package]] 203 | name = "crossbeam-epoch" 204 | version = "0.9.11" 205 | source = "registry+https://github.com/rust-lang/crates.io-index" 206 | checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348" 207 | dependencies = [ 208 | "autocfg", 209 | "cfg-if", 210 | "crossbeam-utils", 211 | "memoffset", 212 | "scopeguard", 213 | ] 214 | 215 | [[package]] 216 | name = "crossbeam-utils" 217 | version = "0.8.12" 218 | source = "registry+https://github.com/rust-lang/crates.io-index" 219 | checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" 220 | dependencies = [ 221 | "cfg-if", 222 | ] 223 | 224 | [[package]] 225 | name = "crunchy" 226 | version = "0.2.2" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 229 | 230 | [[package]] 231 | name = "csv" 232 | version = "1.1.6" 233 | source = "registry+https://github.com/rust-lang/crates.io-index" 234 | checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" 235 | dependencies = [ 236 | "bstr", 237 | "csv-core", 238 | "itoa 0.4.8", 239 | "ryu", 240 | "serde", 241 | ] 242 | 243 | [[package]] 244 | name = "csv-core" 245 | version = "0.1.10" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" 248 | dependencies = [ 249 | "memchr", 250 | ] 251 | 252 | [[package]] 253 | name = "ctor" 254 | version = "0.1.26" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" 257 | dependencies = [ 258 | "quote", 259 | "syn", 260 | ] 261 | 262 | [[package]] 263 | name = "cxx" 264 | version = "1.0.81" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | checksum = "97abf9f0eca9e52b7f81b945524e76710e6cb2366aead23b7d4fbf72e281f888" 267 | dependencies = [ 268 | "cc", 269 | "cxxbridge-flags", 270 | "cxxbridge-macro", 271 | "link-cplusplus", 272 | ] 273 | 274 | [[package]] 275 | name = "cxx-build" 276 | version = "1.0.81" 277 | source = "registry+https://github.com/rust-lang/crates.io-index" 278 | checksum = "7cc32cc5fea1d894b77d269ddb9f192110069a8a9c1f1d441195fba90553dea3" 279 | dependencies = [ 280 | "cc", 281 | "codespan-reporting", 282 | "once_cell", 283 | "proc-macro2", 284 | "quote", 285 | "scratch", 286 | "syn", 287 | ] 288 | 289 | [[package]] 290 | name = "cxxbridge-flags" 291 | version = "1.0.81" 292 | source = "registry+https://github.com/rust-lang/crates.io-index" 293 | checksum = "8ca220e4794c934dc6b1207c3b42856ad4c302f2df1712e9f8d2eec5afaacf1f" 294 | 295 | [[package]] 296 | name = "cxxbridge-macro" 297 | version = "1.0.81" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | checksum = "b846f081361125bfc8dc9d3940c84e1fd83ba54bbca7b17cd29483c828be0704" 300 | dependencies = [ 301 | "proc-macro2", 302 | "quote", 303 | "syn", 304 | ] 305 | 306 | [[package]] 307 | name = "darling" 308 | version = "0.14.2" 309 | source = "registry+https://github.com/rust-lang/crates.io-index" 310 | checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" 311 | dependencies = [ 312 | "darling_core", 313 | "darling_macro", 314 | ] 315 | 316 | [[package]] 317 | name = "darling_core" 318 | version = "0.14.2" 319 | source = "registry+https://github.com/rust-lang/crates.io-index" 320 | checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" 321 | dependencies = [ 322 | "fnv", 323 | "ident_case", 324 | "proc-macro2", 325 | "quote", 326 | "strsim", 327 | "syn", 328 | ] 329 | 330 | [[package]] 331 | name = "darling_macro" 332 | version = "0.14.2" 333 | source = "registry+https://github.com/rust-lang/crates.io-index" 334 | checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" 335 | dependencies = [ 336 | "darling_core", 337 | "quote", 338 | "syn", 339 | ] 340 | 341 | [[package]] 342 | name = "diff" 343 | version = "0.1.13" 344 | source = "registry+https://github.com/rust-lang/crates.io-index" 345 | checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" 346 | 347 | [[package]] 348 | name = "downcast-rs" 349 | version = "1.2.0" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" 352 | 353 | [[package]] 354 | name = "either" 355 | version = "1.8.0" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 358 | 359 | [[package]] 360 | name = "fail" 361 | version = "0.5.1" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "fe5e43d0f78a42ad591453aedb1d7ae631ce7ee445c7643691055a9ed8d3b01c" 364 | dependencies = [ 365 | "log", 366 | "once_cell", 367 | "rand", 368 | ] 369 | 370 | [[package]] 371 | name = "fastdivide" 372 | version = "0.4.0" 373 | source = "registry+https://github.com/rust-lang/crates.io-index" 374 | checksum = "25c7df09945d65ea8d70b3321547ed414bbc540aad5bac6883d021b970f35b04" 375 | 376 | [[package]] 377 | name = "fastfield_codecs" 378 | version = "0.2.0" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "8dff2ee906bb242438742b5ecac909c0719cbd9db546f6c3d9ac86bd93f5b07e" 381 | dependencies = [ 382 | "tantivy-bitpacker", 383 | "tantivy-common", 384 | ] 385 | 386 | [[package]] 387 | name = "fastrand" 388 | version = "1.8.0" 389 | source = "registry+https://github.com/rust-lang/crates.io-index" 390 | checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" 391 | dependencies = [ 392 | "instant", 393 | ] 394 | 395 | [[package]] 396 | name = "fnv" 397 | version = "1.0.7" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 400 | 401 | [[package]] 402 | name = "fs2" 403 | version = "0.4.3" 404 | source = "registry+https://github.com/rust-lang/crates.io-index" 405 | checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" 406 | dependencies = [ 407 | "libc", 408 | "winapi", 409 | ] 410 | 411 | [[package]] 412 | name = "fxhash" 413 | version = "0.2.1" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" 416 | dependencies = [ 417 | "byteorder", 418 | ] 419 | 420 | [[package]] 421 | name = "generator" 422 | version = "0.7.1" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "cc184cace1cea8335047a471cc1da80f18acf8a76f3bab2028d499e328948ec7" 425 | dependencies = [ 426 | "cc", 427 | "libc", 428 | "log", 429 | "rustversion", 430 | "windows", 431 | ] 432 | 433 | [[package]] 434 | name = "getrandom" 435 | version = "0.2.8" 436 | source = "registry+https://github.com/rust-lang/crates.io-index" 437 | checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" 438 | dependencies = [ 439 | "cfg-if", 440 | "libc", 441 | "wasi", 442 | ] 443 | 444 | [[package]] 445 | name = "hashbrown" 446 | version = "0.12.3" 447 | source = "registry+https://github.com/rust-lang/crates.io-index" 448 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 449 | dependencies = [ 450 | "ahash", 451 | ] 452 | 453 | [[package]] 454 | name = "hermit-abi" 455 | version = "0.1.19" 456 | source = "registry+https://github.com/rust-lang/crates.io-index" 457 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 458 | dependencies = [ 459 | "libc", 460 | ] 461 | 462 | [[package]] 463 | name = "hex" 464 | version = "0.4.3" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 467 | 468 | [[package]] 469 | name = "htmlescape" 470 | version = "0.3.1" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "e9025058dae765dee5070ec375f591e2ba14638c63feff74f13805a72e523163" 473 | 474 | [[package]] 475 | name = "iana-time-zone" 476 | version = "0.1.53" 477 | source = "registry+https://github.com/rust-lang/crates.io-index" 478 | checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" 479 | dependencies = [ 480 | "android_system_properties", 481 | "core-foundation-sys", 482 | "iana-time-zone-haiku", 483 | "js-sys", 484 | "wasm-bindgen", 485 | "winapi", 486 | ] 487 | 488 | [[package]] 489 | name = "iana-time-zone-haiku" 490 | version = "0.1.1" 491 | source = "registry+https://github.com/rust-lang/crates.io-index" 492 | checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" 493 | dependencies = [ 494 | "cxx", 495 | "cxx-build", 496 | ] 497 | 498 | [[package]] 499 | name = "ident_case" 500 | version = "1.0.1" 501 | source = "registry+https://github.com/rust-lang/crates.io-index" 502 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 503 | 504 | [[package]] 505 | name = "indexmap" 506 | version = "1.9.1" 507 | source = "registry+https://github.com/rust-lang/crates.io-index" 508 | checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" 509 | dependencies = [ 510 | "autocfg", 511 | "hashbrown", 512 | "serde", 513 | ] 514 | 515 | [[package]] 516 | name = "instant" 517 | version = "0.1.12" 518 | source = "registry+https://github.com/rust-lang/crates.io-index" 519 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 520 | dependencies = [ 521 | "cfg-if", 522 | "js-sys", 523 | "wasm-bindgen", 524 | "web-sys", 525 | ] 526 | 527 | [[package]] 528 | name = "itertools" 529 | version = "0.10.5" 530 | source = "registry+https://github.com/rust-lang/crates.io-index" 531 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 532 | dependencies = [ 533 | "either", 534 | ] 535 | 536 | [[package]] 537 | name = "itoa" 538 | version = "0.4.8" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 541 | 542 | [[package]] 543 | name = "itoa" 544 | version = "1.0.4" 545 | source = "registry+https://github.com/rust-lang/crates.io-index" 546 | checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" 547 | 548 | [[package]] 549 | name = "jieba-rs" 550 | version = "0.6.7" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | checksum = "37228e06c75842d1097432d94d02f37fe3ebfca9791c2e8fef6e9db17ed128c1" 553 | dependencies = [ 554 | "cedarwood", 555 | "fxhash", 556 | "hashbrown", 557 | "lazy_static", 558 | "phf", 559 | "phf_codegen", 560 | "regex", 561 | ] 562 | 563 | [[package]] 564 | name = "js-sys" 565 | version = "0.3.60" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" 568 | dependencies = [ 569 | "wasm-bindgen", 570 | ] 571 | 572 | [[package]] 573 | name = "lazy_static" 574 | version = "1.4.0" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 577 | 578 | [[package]] 579 | name = "levenshtein_automata" 580 | version = "0.2.1" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | checksum = "0c2cdeb66e45e9f36bfad5bbdb4d2384e70936afbee843c6f6543f0c551ebb25" 583 | 584 | [[package]] 585 | name = "libc" 586 | version = "0.2.137" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" 589 | 590 | [[package]] 591 | name = "libgen-search" 592 | version = "0.1.0" 593 | dependencies = [ 594 | "cang-jie", 595 | "csv", 596 | "jieba-rs", 597 | "serde", 598 | "serde_with", 599 | "tantivy", 600 | ] 601 | 602 | [[package]] 603 | name = "link-cplusplus" 604 | version = "1.0.7" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" 607 | dependencies = [ 608 | "cc", 609 | ] 610 | 611 | [[package]] 612 | name = "log" 613 | version = "0.4.17" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 616 | dependencies = [ 617 | "cfg-if", 618 | ] 619 | 620 | [[package]] 621 | name = "loom" 622 | version = "0.5.6" 623 | source = "registry+https://github.com/rust-lang/crates.io-index" 624 | checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" 625 | dependencies = [ 626 | "cfg-if", 627 | "generator", 628 | "pin-utils", 629 | "scoped-tls", 630 | "tracing", 631 | "tracing-subscriber", 632 | ] 633 | 634 | [[package]] 635 | name = "lru" 636 | version = "0.7.8" 637 | source = "registry+https://github.com/rust-lang/crates.io-index" 638 | checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" 639 | dependencies = [ 640 | "hashbrown", 641 | ] 642 | 643 | [[package]] 644 | name = "lz4_flex" 645 | version = "0.9.5" 646 | source = "registry+https://github.com/rust-lang/crates.io-index" 647 | checksum = "1a8cbbb2831780bc3b9c15a41f5b49222ef756b6730a95f3decfdd15903eb5a3" 648 | 649 | [[package]] 650 | name = "matchers" 651 | version = "0.1.0" 652 | source = "registry+https://github.com/rust-lang/crates.io-index" 653 | checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" 654 | dependencies = [ 655 | "regex-automata", 656 | ] 657 | 658 | [[package]] 659 | name = "measure_time" 660 | version = "0.8.2" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "56220900f1a0923789ecd6bf25fbae8af3b2f1ff3e9e297fc9b6b8674dd4d852" 663 | dependencies = [ 664 | "instant", 665 | "log", 666 | ] 667 | 668 | [[package]] 669 | name = "memchr" 670 | version = "2.5.0" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 673 | 674 | [[package]] 675 | name = "memmap2" 676 | version = "0.5.8" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" 679 | dependencies = [ 680 | "libc", 681 | ] 682 | 683 | [[package]] 684 | name = "memoffset" 685 | version = "0.6.5" 686 | source = "registry+https://github.com/rust-lang/crates.io-index" 687 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 688 | dependencies = [ 689 | "autocfg", 690 | ] 691 | 692 | [[package]] 693 | name = "murmurhash32" 694 | version = "0.2.0" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "d736ff882f0e85fe9689fb23db229616c4c00aee2b3ac282f666d8f20eb25d4a" 697 | dependencies = [ 698 | "byteorder", 699 | ] 700 | 701 | [[package]] 702 | name = "nu-ansi-term" 703 | version = "0.46.0" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 706 | dependencies = [ 707 | "overload", 708 | "winapi", 709 | ] 710 | 711 | [[package]] 712 | name = "num-integer" 713 | version = "0.1.45" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 716 | dependencies = [ 717 | "autocfg", 718 | "num-traits", 719 | ] 720 | 721 | [[package]] 722 | name = "num-traits" 723 | version = "0.2.15" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 726 | dependencies = [ 727 | "autocfg", 728 | ] 729 | 730 | [[package]] 731 | name = "num_cpus" 732 | version = "1.14.0" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" 735 | dependencies = [ 736 | "hermit-abi", 737 | "libc", 738 | ] 739 | 740 | [[package]] 741 | name = "once_cell" 742 | version = "1.16.0" 743 | source = "registry+https://github.com/rust-lang/crates.io-index" 744 | checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" 745 | 746 | [[package]] 747 | name = "oneshot" 748 | version = "0.1.5" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "fc22d22931513428ea6cc089e942d38600e3d00976eef8c86de6b8a3aadec6eb" 751 | dependencies = [ 752 | "loom", 753 | ] 754 | 755 | [[package]] 756 | name = "output_vt100" 757 | version = "0.1.3" 758 | source = "registry+https://github.com/rust-lang/crates.io-index" 759 | checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" 760 | dependencies = [ 761 | "winapi", 762 | ] 763 | 764 | [[package]] 765 | name = "overload" 766 | version = "0.1.1" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 769 | 770 | [[package]] 771 | name = "ownedbytes" 772 | version = "0.3.0" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | checksum = "e2981bd7cfb2a70e6c50083c60561275a269fc7458f151c53b126ec1b15cc040" 775 | dependencies = [ 776 | "stable_deref_trait", 777 | ] 778 | 779 | [[package]] 780 | name = "phf" 781 | version = "0.11.1" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" 784 | dependencies = [ 785 | "phf_shared", 786 | ] 787 | 788 | [[package]] 789 | name = "phf_codegen" 790 | version = "0.11.1" 791 | source = "registry+https://github.com/rust-lang/crates.io-index" 792 | checksum = "a56ac890c5e3ca598bbdeaa99964edb5b0258a583a9eb6ef4e89fc85d9224770" 793 | dependencies = [ 794 | "phf_generator", 795 | "phf_shared", 796 | ] 797 | 798 | [[package]] 799 | name = "phf_generator" 800 | version = "0.11.1" 801 | source = "registry+https://github.com/rust-lang/crates.io-index" 802 | checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" 803 | dependencies = [ 804 | "phf_shared", 805 | "rand", 806 | ] 807 | 808 | [[package]] 809 | name = "phf_shared" 810 | version = "0.11.1" 811 | source = "registry+https://github.com/rust-lang/crates.io-index" 812 | checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" 813 | dependencies = [ 814 | "siphasher", 815 | ] 816 | 817 | [[package]] 818 | name = "pin-project-lite" 819 | version = "0.2.9" 820 | source = "registry+https://github.com/rust-lang/crates.io-index" 821 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 822 | 823 | [[package]] 824 | name = "pin-utils" 825 | version = "0.1.0" 826 | source = "registry+https://github.com/rust-lang/crates.io-index" 827 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 828 | 829 | [[package]] 830 | name = "ppv-lite86" 831 | version = "0.2.17" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 834 | 835 | [[package]] 836 | name = "pretty_assertions" 837 | version = "1.3.0" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" 840 | dependencies = [ 841 | "ctor", 842 | "diff", 843 | "output_vt100", 844 | "yansi", 845 | ] 846 | 847 | [[package]] 848 | name = "proc-macro2" 849 | version = "1.0.47" 850 | source = "registry+https://github.com/rust-lang/crates.io-index" 851 | checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" 852 | dependencies = [ 853 | "unicode-ident", 854 | ] 855 | 856 | [[package]] 857 | name = "quote" 858 | version = "1.0.21" 859 | source = "registry+https://github.com/rust-lang/crates.io-index" 860 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 861 | dependencies = [ 862 | "proc-macro2", 863 | ] 864 | 865 | [[package]] 866 | name = "rand" 867 | version = "0.8.5" 868 | source = "registry+https://github.com/rust-lang/crates.io-index" 869 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 870 | dependencies = [ 871 | "libc", 872 | "rand_chacha", 873 | "rand_core", 874 | ] 875 | 876 | [[package]] 877 | name = "rand_chacha" 878 | version = "0.3.1" 879 | source = "registry+https://github.com/rust-lang/crates.io-index" 880 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 881 | dependencies = [ 882 | "ppv-lite86", 883 | "rand_core", 884 | ] 885 | 886 | [[package]] 887 | name = "rand_core" 888 | version = "0.6.4" 889 | source = "registry+https://github.com/rust-lang/crates.io-index" 890 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 891 | dependencies = [ 892 | "getrandom", 893 | ] 894 | 895 | [[package]] 896 | name = "rayon" 897 | version = "1.5.3" 898 | source = "registry+https://github.com/rust-lang/crates.io-index" 899 | checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" 900 | dependencies = [ 901 | "autocfg", 902 | "crossbeam-deque", 903 | "either", 904 | "rayon-core", 905 | ] 906 | 907 | [[package]] 908 | name = "rayon-core" 909 | version = "1.9.3" 910 | source = "registry+https://github.com/rust-lang/crates.io-index" 911 | checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" 912 | dependencies = [ 913 | "crossbeam-channel", 914 | "crossbeam-deque", 915 | "crossbeam-utils", 916 | "num_cpus", 917 | ] 918 | 919 | [[package]] 920 | name = "redox_syscall" 921 | version = "0.2.16" 922 | source = "registry+https://github.com/rust-lang/crates.io-index" 923 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 924 | dependencies = [ 925 | "bitflags", 926 | ] 927 | 928 | [[package]] 929 | name = "regex" 930 | version = "1.7.0" 931 | source = "registry+https://github.com/rust-lang/crates.io-index" 932 | checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" 933 | dependencies = [ 934 | "aho-corasick", 935 | "memchr", 936 | "regex-syntax 0.6.28", 937 | ] 938 | 939 | [[package]] 940 | name = "regex-automata" 941 | version = "0.1.10" 942 | source = "registry+https://github.com/rust-lang/crates.io-index" 943 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 944 | dependencies = [ 945 | "regex-syntax 0.6.28", 946 | ] 947 | 948 | [[package]] 949 | name = "regex-syntax" 950 | version = "0.4.2" 951 | source = "registry+https://github.com/rust-lang/crates.io-index" 952 | checksum = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" 953 | 954 | [[package]] 955 | name = "regex-syntax" 956 | version = "0.6.28" 957 | source = "registry+https://github.com/rust-lang/crates.io-index" 958 | checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" 959 | 960 | [[package]] 961 | name = "remove_dir_all" 962 | version = "0.5.3" 963 | source = "registry+https://github.com/rust-lang/crates.io-index" 964 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 965 | dependencies = [ 966 | "winapi", 967 | ] 968 | 969 | [[package]] 970 | name = "rust-stemmers" 971 | version = "1.2.0" 972 | source = "registry+https://github.com/rust-lang/crates.io-index" 973 | checksum = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54" 974 | dependencies = [ 975 | "serde", 976 | "serde_derive", 977 | ] 978 | 979 | [[package]] 980 | name = "rustversion" 981 | version = "1.0.9" 982 | source = "registry+https://github.com/rust-lang/crates.io-index" 983 | checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" 984 | 985 | [[package]] 986 | name = "ryu" 987 | version = "1.0.11" 988 | source = "registry+https://github.com/rust-lang/crates.io-index" 989 | checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" 990 | 991 | [[package]] 992 | name = "scoped-tls" 993 | version = "1.0.1" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 996 | 997 | [[package]] 998 | name = "scopeguard" 999 | version = "1.1.0" 1000 | source = "registry+https://github.com/rust-lang/crates.io-index" 1001 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1002 | 1003 | [[package]] 1004 | name = "scratch" 1005 | version = "1.0.2" 1006 | source = "registry+https://github.com/rust-lang/crates.io-index" 1007 | checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" 1008 | 1009 | [[package]] 1010 | name = "serde" 1011 | version = "1.0.147" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" 1014 | dependencies = [ 1015 | "serde_derive", 1016 | ] 1017 | 1018 | [[package]] 1019 | name = "serde_derive" 1020 | version = "1.0.147" 1021 | source = "registry+https://github.com/rust-lang/crates.io-index" 1022 | checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" 1023 | dependencies = [ 1024 | "proc-macro2", 1025 | "quote", 1026 | "syn", 1027 | ] 1028 | 1029 | [[package]] 1030 | name = "serde_json" 1031 | version = "1.0.87" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" 1034 | dependencies = [ 1035 | "itoa 1.0.4", 1036 | "ryu", 1037 | "serde", 1038 | ] 1039 | 1040 | [[package]] 1041 | name = "serde_with" 1042 | version = "2.0.1" 1043 | source = "registry+https://github.com/rust-lang/crates.io-index" 1044 | checksum = "368f2d60d049ea019a84dcd6687b0d1e0030fe663ae105039bdf967ed5e6a9a7" 1045 | dependencies = [ 1046 | "base64", 1047 | "chrono", 1048 | "hex", 1049 | "indexmap", 1050 | "serde", 1051 | "serde_json", 1052 | "serde_with_macros", 1053 | "time", 1054 | ] 1055 | 1056 | [[package]] 1057 | name = "serde_with_macros" 1058 | version = "2.0.1" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | checksum = "1ccadfacf6cf10faad22bbadf55986bdd0856edfb5d9210aa1dcf1f516e84e93" 1061 | dependencies = [ 1062 | "darling", 1063 | "proc-macro2", 1064 | "quote", 1065 | "syn", 1066 | ] 1067 | 1068 | [[package]] 1069 | name = "sharded-slab" 1070 | version = "0.1.4" 1071 | source = "registry+https://github.com/rust-lang/crates.io-index" 1072 | checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" 1073 | dependencies = [ 1074 | "lazy_static", 1075 | ] 1076 | 1077 | [[package]] 1078 | name = "siphasher" 1079 | version = "0.3.10" 1080 | source = "registry+https://github.com/rust-lang/crates.io-index" 1081 | checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" 1082 | 1083 | [[package]] 1084 | name = "smallvec" 1085 | version = "1.10.0" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1088 | 1089 | [[package]] 1090 | name = "stable_deref_trait" 1091 | version = "1.2.0" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 1094 | 1095 | [[package]] 1096 | name = "strsim" 1097 | version = "0.10.0" 1098 | source = "registry+https://github.com/rust-lang/crates.io-index" 1099 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1100 | 1101 | [[package]] 1102 | name = "syn" 1103 | version = "1.0.103" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" 1106 | dependencies = [ 1107 | "proc-macro2", 1108 | "quote", 1109 | "unicode-ident", 1110 | ] 1111 | 1112 | [[package]] 1113 | name = "tantivy" 1114 | version = "0.18.1" 1115 | source = "registry+https://github.com/rust-lang/crates.io-index" 1116 | checksum = "69d1878f2daa432d6b907e1a7e16a25ba7eab6cc0da059e69943276a5165d81b" 1117 | dependencies = [ 1118 | "async-trait", 1119 | "base64", 1120 | "bitpacking", 1121 | "byteorder", 1122 | "census", 1123 | "crc32fast", 1124 | "crossbeam-channel", 1125 | "downcast-rs", 1126 | "fail", 1127 | "fastdivide", 1128 | "fastfield_codecs", 1129 | "fnv", 1130 | "fs2", 1131 | "htmlescape", 1132 | "itertools", 1133 | "levenshtein_automata", 1134 | "log", 1135 | "lru", 1136 | "lz4_flex", 1137 | "measure_time", 1138 | "memmap2", 1139 | "murmurhash32", 1140 | "num_cpus", 1141 | "once_cell", 1142 | "oneshot", 1143 | "ownedbytes", 1144 | "pretty_assertions", 1145 | "rayon", 1146 | "regex", 1147 | "rust-stemmers", 1148 | "serde", 1149 | "serde_json", 1150 | "smallvec", 1151 | "stable_deref_trait", 1152 | "tantivy-bitpacker", 1153 | "tantivy-common", 1154 | "tantivy-fst", 1155 | "tantivy-query-grammar", 1156 | "tempfile", 1157 | "thiserror", 1158 | "time", 1159 | "uuid", 1160 | "winapi", 1161 | ] 1162 | 1163 | [[package]] 1164 | name = "tantivy-bitpacker" 1165 | version = "0.2.0" 1166 | source = "registry+https://github.com/rust-lang/crates.io-index" 1167 | checksum = "90f95c862d26a32e1fdb161ab139c5a3bba221f5fac512af40034e13e25f3131" 1168 | 1169 | [[package]] 1170 | name = "tantivy-common" 1171 | version = "0.3.0" 1172 | source = "registry+https://github.com/rust-lang/crates.io-index" 1173 | checksum = "dec19155b3ed963ae1653bc4995ab8175281f68400c39081205ae25b53fd9750" 1174 | dependencies = [ 1175 | "byteorder", 1176 | "ownedbytes", 1177 | ] 1178 | 1179 | [[package]] 1180 | name = "tantivy-fst" 1181 | version = "0.3.0" 1182 | source = "registry+https://github.com/rust-lang/crates.io-index" 1183 | checksum = "cb20cdc0d83e9184560bdde9cd60142dbb4af2e0f770e88fce45770495224205" 1184 | dependencies = [ 1185 | "byteorder", 1186 | "regex-syntax 0.4.2", 1187 | "utf8-ranges", 1188 | ] 1189 | 1190 | [[package]] 1191 | name = "tantivy-query-grammar" 1192 | version = "0.18.0" 1193 | source = "registry+https://github.com/rust-lang/crates.io-index" 1194 | checksum = "5d6bbdce99f2b8dcbe24ee25acffb36a2b45b31344531374df1008f6a64bb583" 1195 | dependencies = [ 1196 | "combine", 1197 | "once_cell", 1198 | "regex", 1199 | ] 1200 | 1201 | [[package]] 1202 | name = "tempfile" 1203 | version = "3.3.0" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" 1206 | dependencies = [ 1207 | "cfg-if", 1208 | "fastrand", 1209 | "libc", 1210 | "redox_syscall", 1211 | "remove_dir_all", 1212 | "winapi", 1213 | ] 1214 | 1215 | [[package]] 1216 | name = "termcolor" 1217 | version = "1.1.3" 1218 | source = "registry+https://github.com/rust-lang/crates.io-index" 1219 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 1220 | dependencies = [ 1221 | "winapi-util", 1222 | ] 1223 | 1224 | [[package]] 1225 | name = "thiserror" 1226 | version = "1.0.37" 1227 | source = "registry+https://github.com/rust-lang/crates.io-index" 1228 | checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" 1229 | dependencies = [ 1230 | "thiserror-impl", 1231 | ] 1232 | 1233 | [[package]] 1234 | name = "thiserror-impl" 1235 | version = "1.0.37" 1236 | source = "registry+https://github.com/rust-lang/crates.io-index" 1237 | checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" 1238 | dependencies = [ 1239 | "proc-macro2", 1240 | "quote", 1241 | "syn", 1242 | ] 1243 | 1244 | [[package]] 1245 | name = "thread_local" 1246 | version = "1.1.4" 1247 | source = "registry+https://github.com/rust-lang/crates.io-index" 1248 | checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" 1249 | dependencies = [ 1250 | "once_cell", 1251 | ] 1252 | 1253 | [[package]] 1254 | name = "time" 1255 | version = "0.3.17" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" 1258 | dependencies = [ 1259 | "itoa 1.0.4", 1260 | "serde", 1261 | "time-core", 1262 | "time-macros", 1263 | ] 1264 | 1265 | [[package]] 1266 | name = "time-core" 1267 | version = "0.1.0" 1268 | source = "registry+https://github.com/rust-lang/crates.io-index" 1269 | checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" 1270 | 1271 | [[package]] 1272 | name = "time-macros" 1273 | version = "0.2.6" 1274 | source = "registry+https://github.com/rust-lang/crates.io-index" 1275 | checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" 1276 | dependencies = [ 1277 | "time-core", 1278 | ] 1279 | 1280 | [[package]] 1281 | name = "tracing" 1282 | version = "0.1.37" 1283 | source = "registry+https://github.com/rust-lang/crates.io-index" 1284 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1285 | dependencies = [ 1286 | "cfg-if", 1287 | "pin-project-lite", 1288 | "tracing-attributes", 1289 | "tracing-core", 1290 | ] 1291 | 1292 | [[package]] 1293 | name = "tracing-attributes" 1294 | version = "0.1.23" 1295 | source = "registry+https://github.com/rust-lang/crates.io-index" 1296 | checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" 1297 | dependencies = [ 1298 | "proc-macro2", 1299 | "quote", 1300 | "syn", 1301 | ] 1302 | 1303 | [[package]] 1304 | name = "tracing-core" 1305 | version = "0.1.30" 1306 | source = "registry+https://github.com/rust-lang/crates.io-index" 1307 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 1308 | dependencies = [ 1309 | "once_cell", 1310 | "valuable", 1311 | ] 1312 | 1313 | [[package]] 1314 | name = "tracing-log" 1315 | version = "0.1.3" 1316 | source = "registry+https://github.com/rust-lang/crates.io-index" 1317 | checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" 1318 | dependencies = [ 1319 | "lazy_static", 1320 | "log", 1321 | "tracing-core", 1322 | ] 1323 | 1324 | [[package]] 1325 | name = "tracing-subscriber" 1326 | version = "0.3.16" 1327 | source = "registry+https://github.com/rust-lang/crates.io-index" 1328 | checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" 1329 | dependencies = [ 1330 | "matchers", 1331 | "nu-ansi-term", 1332 | "once_cell", 1333 | "regex", 1334 | "sharded-slab", 1335 | "smallvec", 1336 | "thread_local", 1337 | "tracing", 1338 | "tracing-core", 1339 | "tracing-log", 1340 | ] 1341 | 1342 | [[package]] 1343 | name = "unicode-ident" 1344 | version = "1.0.5" 1345 | source = "registry+https://github.com/rust-lang/crates.io-index" 1346 | checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" 1347 | 1348 | [[package]] 1349 | name = "unicode-width" 1350 | version = "0.1.10" 1351 | source = "registry+https://github.com/rust-lang/crates.io-index" 1352 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 1353 | 1354 | [[package]] 1355 | name = "utf8-ranges" 1356 | version = "1.0.5" 1357 | source = "registry+https://github.com/rust-lang/crates.io-index" 1358 | checksum = "7fcfc827f90e53a02eaef5e535ee14266c1d569214c6aa70133a624d8a3164ba" 1359 | 1360 | [[package]] 1361 | name = "uuid" 1362 | version = "1.2.1" 1363 | source = "registry+https://github.com/rust-lang/crates.io-index" 1364 | checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83" 1365 | dependencies = [ 1366 | "getrandom", 1367 | "serde", 1368 | ] 1369 | 1370 | [[package]] 1371 | name = "valuable" 1372 | version = "0.1.0" 1373 | source = "registry+https://github.com/rust-lang/crates.io-index" 1374 | checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" 1375 | 1376 | [[package]] 1377 | name = "version_check" 1378 | version = "0.9.4" 1379 | source = "registry+https://github.com/rust-lang/crates.io-index" 1380 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1381 | 1382 | [[package]] 1383 | name = "wasi" 1384 | version = "0.11.0+wasi-snapshot-preview1" 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" 1386 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1387 | 1388 | [[package]] 1389 | name = "wasm-bindgen" 1390 | version = "0.2.83" 1391 | source = "registry+https://github.com/rust-lang/crates.io-index" 1392 | checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" 1393 | dependencies = [ 1394 | "cfg-if", 1395 | "wasm-bindgen-macro", 1396 | ] 1397 | 1398 | [[package]] 1399 | name = "wasm-bindgen-backend" 1400 | version = "0.2.83" 1401 | source = "registry+https://github.com/rust-lang/crates.io-index" 1402 | checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" 1403 | dependencies = [ 1404 | "bumpalo", 1405 | "log", 1406 | "once_cell", 1407 | "proc-macro2", 1408 | "quote", 1409 | "syn", 1410 | "wasm-bindgen-shared", 1411 | ] 1412 | 1413 | [[package]] 1414 | name = "wasm-bindgen-macro" 1415 | version = "0.2.83" 1416 | source = "registry+https://github.com/rust-lang/crates.io-index" 1417 | checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" 1418 | dependencies = [ 1419 | "quote", 1420 | "wasm-bindgen-macro-support", 1421 | ] 1422 | 1423 | [[package]] 1424 | name = "wasm-bindgen-macro-support" 1425 | version = "0.2.83" 1426 | source = "registry+https://github.com/rust-lang/crates.io-index" 1427 | checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" 1428 | dependencies = [ 1429 | "proc-macro2", 1430 | "quote", 1431 | "syn", 1432 | "wasm-bindgen-backend", 1433 | "wasm-bindgen-shared", 1434 | ] 1435 | 1436 | [[package]] 1437 | name = "wasm-bindgen-shared" 1438 | version = "0.2.83" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" 1441 | 1442 | [[package]] 1443 | name = "web-sys" 1444 | version = "0.3.60" 1445 | source = "registry+https://github.com/rust-lang/crates.io-index" 1446 | checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" 1447 | dependencies = [ 1448 | "js-sys", 1449 | "wasm-bindgen", 1450 | ] 1451 | 1452 | [[package]] 1453 | name = "winapi" 1454 | version = "0.3.9" 1455 | source = "registry+https://github.com/rust-lang/crates.io-index" 1456 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1457 | dependencies = [ 1458 | "winapi-i686-pc-windows-gnu", 1459 | "winapi-x86_64-pc-windows-gnu", 1460 | ] 1461 | 1462 | [[package]] 1463 | name = "winapi-i686-pc-windows-gnu" 1464 | version = "0.4.0" 1465 | source = "registry+https://github.com/rust-lang/crates.io-index" 1466 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1467 | 1468 | [[package]] 1469 | name = "winapi-util" 1470 | version = "0.1.5" 1471 | source = "registry+https://github.com/rust-lang/crates.io-index" 1472 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1473 | dependencies = [ 1474 | "winapi", 1475 | ] 1476 | 1477 | [[package]] 1478 | name = "winapi-x86_64-pc-windows-gnu" 1479 | version = "0.4.0" 1480 | source = "registry+https://github.com/rust-lang/crates.io-index" 1481 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1482 | 1483 | [[package]] 1484 | name = "windows" 1485 | version = "0.32.0" 1486 | source = "registry+https://github.com/rust-lang/crates.io-index" 1487 | checksum = "fbedf6db9096bc2364adce0ae0aa636dcd89f3c3f2cd67947062aaf0ca2a10ec" 1488 | dependencies = [ 1489 | "windows_aarch64_msvc", 1490 | "windows_i686_gnu", 1491 | "windows_i686_msvc", 1492 | "windows_x86_64_gnu", 1493 | "windows_x86_64_msvc", 1494 | ] 1495 | 1496 | [[package]] 1497 | name = "windows_aarch64_msvc" 1498 | version = "0.32.0" 1499 | source = "registry+https://github.com/rust-lang/crates.io-index" 1500 | checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" 1501 | 1502 | [[package]] 1503 | name = "windows_i686_gnu" 1504 | version = "0.32.0" 1505 | source = "registry+https://github.com/rust-lang/crates.io-index" 1506 | checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" 1507 | 1508 | [[package]] 1509 | name = "windows_i686_msvc" 1510 | version = "0.32.0" 1511 | source = "registry+https://github.com/rust-lang/crates.io-index" 1512 | checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" 1513 | 1514 | [[package]] 1515 | name = "windows_x86_64_gnu" 1516 | version = "0.32.0" 1517 | source = "registry+https://github.com/rust-lang/crates.io-index" 1518 | checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" 1519 | 1520 | [[package]] 1521 | name = "windows_x86_64_msvc" 1522 | version = "0.32.0" 1523 | source = "registry+https://github.com/rust-lang/crates.io-index" 1524 | checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" 1525 | 1526 | [[package]] 1527 | name = "yansi" 1528 | version = "0.5.1" 1529 | source = "registry+https://github.com/rust-lang/crates.io-index" 1530 | checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" 1531 | --------------------------------------------------------------------------------