mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 22:43:12 +00:00
Merge pull request #944 from aschweer/DS-2461-discovery-colon
DS-2461 Escape some colons in queries
This commit is contained in:
@@ -1617,6 +1617,14 @@ public class SolrServiceImpl implements SearchService, IndexingService {
|
||||
if(discoveryQuery.getQuery() != null)
|
||||
{
|
||||
query = discoveryQuery.getQuery();
|
||||
if (query.contains(": "))
|
||||
{
|
||||
query = StringUtils.replace(query, ": ", "\\: ");
|
||||
}
|
||||
else if (query.endsWith(":"))
|
||||
{
|
||||
query = StringUtils.removeEnd(query, ":") + "\\:";
|
||||
}
|
||||
}
|
||||
|
||||
solrQuery.setQuery(query);
|
||||
|
Reference in New Issue
Block a user