From 6950dffcb41eb3df8d3dc9a33be9fd2e874ad7a3 Mon Sep 17 00:00:00 2001 From: Viktor Lofgren Date: Wed, 14 Feb 2024 11:47:14 +0100 Subject: [PATCH] (API) Fix result order in API results These results should be presented in the same order as their ranking score. --- .../src/main/java/nu/marginalia/api/ApiSearchOperator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/services-application/api-service/src/main/java/nu/marginalia/api/ApiSearchOperator.java b/code/services-application/api-service/src/main/java/nu/marginalia/api/ApiSearchOperator.java index f02afedd..a1180f4c 100644 --- a/code/services-application/api-service/src/main/java/nu/marginalia/api/ApiSearchOperator.java +++ b/code/services-application/api-service/src/main/java/nu/marginalia/api/ApiSearchOperator.java @@ -40,7 +40,7 @@ public class ApiSearchOperator { rsp.results() .stream() .map(this::convert) - .sorted(Comparator.comparing(ApiSearchResult::getQuality).reversed()) + .sorted(Comparator.comparing(ApiSearchResult::getQuality)) .limit(count) .collect(Collectors.toList())); }