Skip to content

Commit ba73fb2

Browse files
committed
feat: bump max search results
1 parent 3c14b2e commit ba73fb2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

backend/src/main/java/io/papermc/hangar/components/index/MeiliService.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ public void setupProjectIndex(String suffix) {
7373
"searchableAttributes", List.of("name", "namespace.owner", "description", "category", "mainPageContent", "memberNames", "createdAt", "lastUpdated", "stats", "settings.keywords", "settings.tags"),
7474
"displayedAttributes", List.of("*"),
7575
"filterableAttributes", List.of("category", "settings.tags", "namespace.owner", "createdAt", "lastUpdated", "settings.license.type", "supportedPlatforms", "memberNames", "visibility"),
76-
"sortableAttributes", List.of("stats.views", "stats.downloads", "stats.recentDownloads", "stats.recentViews", "stats.stars", "createdAt", "lastUpdated", "name")
76+
"sortableAttributes", List.of("stats.views", "stats.downloads", "stats.recentDownloads", "stats.recentViews", "stats.stars", "createdAt", "lastUpdated", "name"),
77+
"pagination", Map.of("maxTotalHits", 5000)
7778
);
7879
waitForTask(restClient.patch().uri("/indexes/" + this.config.meili().prefix() + PROJECT_INDEX + suffix + "/settings").contentType(MediaType.APPLICATION_JSON).body(settings).retrieve().toEntity(Task.class));
7980
}
@@ -89,7 +90,8 @@ public void setupVersionIndex(String suffix) {
8990
"searchableAttributes", List.of("name", "description", "author", "platformDependencies", "channel.name", "projectId"),
9091
"displayedAttributes", List.of("*"),
9192
"filterableAttributes", List.of("platformDependencies", "channel.name", "projectId", "visibility", "memberNames"),
92-
"sortableAttributes", List.of("createdAt")
93+
"sortableAttributes", List.of("createdAt"),
94+
"pagination", Map.of("maxTotalHits", 5000)
9395
);
9496
waitForTask(restClient.patch().uri("/indexes/" + this.config.meili().prefix() + VERSION_INDEX + suffix + "/settings").contentType(MediaType.APPLICATION_JSON).body(settings).retrieve().toEntity(Task.class));
9597
}

0 commit comments

Comments
 (0)