Commit f60e77b7 authored by Romain Hunault's avatar Romain Hunault

Merge branch 'issue-1044' into 'master'

Limit search suggestion to three

See merge request !34
parents e10d9921 1b254eee
Pipeline #54934 canceled with stage
......@@ -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