Skip to content

Commit

Permalink
Preserve order of suggestions search results (#2065)
Browse files Browse the repository at this point in the history
Use ordered list (`toList`), not unordered set (`toSet`)
  • Loading branch information
fsteeg committed Sep 4, 2024
1 parent c7065a3 commit c079c0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/app/controllers/resources/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ private static JsonNode toSuggestions(JsonNode json, String field) {
: typeText));
});
});
return Json.toJson(suggestions.collect(Collectors.toSet()));
return Json.toJson(suggestions.collect(Collectors.toList()));
}

private static Stream<JsonNode> fieldValues(String field, JsonNode document) {
Expand Down

0 comments on commit c079c0a

Please sign in to comment.