diff options
Diffstat (limited to 'indexer/src/main.rs')
-rw-r--r-- | indexer/src/main.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/indexer/src/main.rs b/indexer/src/main.rs index 7d5a1af..8d738cd 100644 --- a/indexer/src/main.rs +++ b/indexer/src/main.rs @@ -161,8 +161,6 @@ async fn search( data: web::Data<AppState>, path: web::Path<OptSearchPath>, ) -> impl Responder { - let indexer = data.indexer.lock().unwrap(); - let query = match &path.query { Some(query) => query, None => return "[]".to_string(), @@ -170,8 +168,8 @@ async fn search( println!("Query: {:?}", query); - let results = indexer.search(query); - //+is lowercase search good (we turn ascii lowercase, what do we do with inserting) + let results = data.indexer.lock().unwrap().search(query); + //indexer is slow (gets stuck when inserting stuff) serde_json::to_string(&results.unwrap()).unwrap() } |