mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
add the limit field to http-ui
This commit is contained in:
parent
ca9fa329d1
commit
81643e6d70
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue