From d2fb2ff404611609e59877414c0541057b0fdbc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Fri, 21 Sep 2018 22:37:43 +0200 Subject: [PATCH] feat: Change the query name to 'q' --- raptor-http/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raptor-http/src/main.rs b/raptor-http/src/main.rs index 404a6d48f..323219b65 100644 --- a/raptor-http/src/main.rs +++ b/raptor-http/src/main.rs @@ -30,7 +30,7 @@ struct Opt { } #[derive(Debug, Deserialize)] -struct SearchQuery { query: String } +struct SearchQuery { q: String } #[derive(Debug, Serialize)] struct Document<'a> { @@ -120,7 +120,7 @@ fn main() { let routes = warp::path("search") .and(warp::query()) .map(move |query: SearchQuery| { - let body = search(meta.clone(), db.clone(), &common_words, &query.query).unwrap(); + let body = search(meta.clone(), db.clone(), &common_words, &query.q).unwrap(); body }) .with(warp::reply::with::header("Content-Type", "application/json"))