Commit 1b254eee authored by Dayona Joseph's avatar Dayona Joseph Committed by Romain Hunault

Limit search suggestion to three

parent e10d9921
......@@ -31,7 +31,7 @@ public class DuckDuckGoProvider implements SuggestionProvider {
}))
.onErrorReturn(throwable -> new ArrayList<>())
.flatMapIterable(duckDuckGoResults -> duckDuckGoResults)
.take(5)
.take(3)
.map(DuckDuckGoResult::getPhrase)
.toList()
.map(suggestions -> {
......
......@@ -30,7 +30,7 @@ public class QwantProvider implements SuggestionProvider {
}))
.filter(qwantResult -> qwantResult.getStatus().equals("success"))
.flatMapIterable(qwantResult -> qwantResult.getData().getItems())
.take(5)
.take(3)
.map(QwantItem::getValue)
.toList()
.map(suggestions -> {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment