This commit is contained in:
Stefan Hardegger
2026-07-20 12:32:53 +02:00
parent f7eabe1761
commit ddfc5aef99
2 changed files with 7 additions and 3 deletions

View File

@@ -912,8 +912,8 @@ public class SolrService {
solrQuery.setStart(page * limit);
solrQuery.setRows(limit);
// Sorting - by name ascending
solrQuery.setSort("name", SolrQuery.ORDER.asc);
// Sorting - by name ascending (name_sort is a docValues string copy of name)
solrQuery.setSort("name_sort", SolrQuery.ORDER.asc);
// Explicitly disable faceting
solrQuery.setFacet(false);
@@ -1150,7 +1150,8 @@ public class SolrService {
collection.setCoverImagePath((String) doc.getFieldValue("coverImagePath"));
collection.setIsArchived((Boolean) doc.getFieldValue("isArchived"));
collection.setStoryCount((Integer) doc.getFieldValue("storyCount"));
collection.setTotalWordCount((Integer) doc.getFieldValue("totalWordCount"));
Number totalWordCountVal = (Number) doc.getFieldValue("totalWordCount");
collection.setTotalWordCount(totalWordCountVal != null ? totalWordCountVal.intValue() : null);
collection.setEstimatedReadingTime((Integer) doc.getFieldValue("estimatedReadingTime"));
Double avgRating = (Double) doc.getFieldValue("averageStoryRating");