mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-30 08:44:27 +01:00
add the limit field to http-ui
This commit is contained in:
parent
ca9fa329d1
commit
81643e6d70
@ -683,6 +683,7 @@ async fn main() -> anyhow::Result<()> {
|
|||||||
filters: Option<String>,
|
filters: Option<String>,
|
||||||
facet_filters: Option<Vec<UntaggedEither<Vec<String>, String>>>,
|
facet_filters: Option<Vec<UntaggedEither<Vec<String>, String>>>,
|
||||||
facet_distribution: Option<bool>,
|
facet_distribution: Option<bool>,
|
||||||
|
limit: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
@ -735,6 +736,10 @@ async fn main() -> anyhow::Result<()> {
|
|||||||
search.filter(condition);
|
search.filter(condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(limit) = query.limit {
|
||||||
|
search.limit(limit);
|
||||||
|
}
|
||||||
|
|
||||||
let SearchResult { matching_words, candidates, documents_ids } =
|
let SearchResult { matching_words, candidates, documents_ids } =
|
||||||
search.execute().unwrap();
|
search.execute().unwrap();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user