mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-10 14:11:25 +00:00
[ACS-9073] address review comments
This commit is contained in:
@@ -352,16 +352,19 @@ public class AlfrescoSolrHighlighter extends DefaultSolrHighlighter implements P
|
||||
if (highlightFieldEntry.getValue() instanceof String[])
|
||||
{
|
||||
String [] snippets = (String[])highlightFieldEntry.getValue();
|
||||
if (snippets.length > 0)
|
||||
if (snippets != null && snippets.length > 0 && snippets[0] != null)
|
||||
{
|
||||
if (snippets[0].charAt(0) == '\u0000')
|
||||
{
|
||||
int pos = snippets[0].indexOf('\u0000',1);
|
||||
if(pos != -1)
|
||||
{
|
||||
snippets[0] = snippets[0].substring(pos + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private AbstractMap.SimpleEntry<String, DocumentIdentifiers> identifiersEntry(SolrIndexSearcher searcher, int docid, Set<String> idFields, String idFieldName)
|
||||
{
|
||||
|
Reference in New Issue
Block a user