about summary refs log tree commit diff
path: root/indexer/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'indexer/src/main.rs')
-rw-r--r--indexer/src/main.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/indexer/src/main.rs b/indexer/src/main.rs
index 18604a6..36bd8de 100644
--- a/indexer/src/main.rs
+++ b/indexer/src/main.rs
@@ -106,6 +106,9 @@ async fn search(data: web::Data<AppState>, term: web::Path<String>) -> impl Resp
     //percentage of valid words
     let mut valid_results: Option<HashSet<IndexedResource>> = None;
     for w in query {
+        //Normalise queries to lowercase
+        let w = w.to_ascii_lowercase();
+
         let curr_word_results = match search_word_in_db(&database, w.to_string()) {
             None => return "[]".to_string(),
             Some(curr_results) => curr_results,