Merge pull request 'master' (#55) from master into release

Reviewed-on: https://git.marginalia.nu/marginalia/marginalia.nu/pulls/55
This commit is contained in:
Viktor Lofgren 2022-07-28 19:03:06 +02:00
commit 85cf636592

View File

@ -112,8 +112,10 @@ public class EdgeSearchOperator {
}
private List<BrowseResult> getDomainResults(Context ctx, EdgeSearchSpecification specs) {
var requests = specs.subqueries.stream().filter(sq -> sq.searchTermsExclude.isEmpty() && sq.searchTermsInclude.size() == 1)
var requests = specs.subqueries.stream()
.filter(sq -> sq.searchTermsExclude.isEmpty() && sq.searchTermsInclude.size() == 1)
.flatMap(sq -> sq.searchTermsInclude.stream())
.distinct()
.map(keyword -> new EdgeDomainSearchSpecification(specs.buckets.get(0), IndexBlock.TitleKeywords, keyword, 1_000_000, 10, 20))
.toArray(EdgeDomainSearchSpecification[]::new);