mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-22 20:50:04 +01:00
feat: Change the query name to 'q'
This commit is contained in:
parent
c99ba88288
commit
d2fb2ff404
@ -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"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user