From 81643e6d70704d7675f9b50fcc41b764ecf78c15 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 22 Jun 2021 14:47:23 +0200 Subject: [PATCH] add the limit field to http-ui --- http-ui/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/http-ui/src/main.rs b/http-ui/src/main.rs index 703861058..8035cf789 100644 --- a/http-ui/src/main.rs +++ b/http-ui/src/main.rs @@ -683,6 +683,7 @@ async fn main() -> anyhow::Result<()> { filters: Option, facet_filters: Option, String>>>, facet_distribution: Option, + limit: Option, } #[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();