add the limit field to http-ui

This commit is contained in:
Tamo 2021-06-22 14:47:23 +02:00
parent ca9fa329d1
commit 81643e6d70
No known key found for this signature in database
GPG Key ID: 20CD8020AFA88D69

View File

@ -683,6 +683,7 @@ async fn main() -> anyhow::Result<()> {
filters: Option<String>,
facet_filters: Option<Vec<UntaggedEither<Vec<String>, String>>>,
facet_distribution: Option<bool>,
limit: Option<usize>,
}
#[derive(Debug, Serialize)]
@ -735,6 +736,10 @@ async fn main() -> anyhow::Result<()> {
search.filter(condition);
}
if let Some(limit) = query.limit {
search.limit(limit);
}
let SearchResult { matching_words, candidates, documents_ids } =
search.execute().unwrap();