Modify Solr query to find collections with submit permissions in searches with spaces

(cherry picked from commit 425dc1556e)
This commit is contained in:
Toni Prieto
2024-10-27 09:40:05 +01:00
committed by github-actions[bot]
parent 5aa873f6cb
commit e4949959cf
2 changed files with 19 additions and 2 deletions

View File

@@ -1021,7 +1021,8 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
if (StringUtils.isNotBlank(q)) {
StringBuilder buildQuery = new StringBuilder();
String escapedQuery = ClientUtils.escapeQueryChars(q);
buildQuery.append("(").append(escapedQuery).append(" OR ").append(escapedQuery).append("*").append(")");
buildQuery.append("(").append(escapedQuery).append(" OR dc.title_sort:*")
.append(escapedQuery).append("*").append(")");
discoverQuery.setQuery(buildQuery.toString());
}
DiscoverResult resp = searchService.search(context, discoverQuery);