SOLR-8583: Do not attempt highlight of alternate if it is same as original hl field

(cherry picked from commit 05ce40a)
This commit is contained in:
Jan Høydahl 2016-05-30 10:24:23 +02:00
parent 3a74daab20
commit a460addd2f
1 changed files with 1 additions and 1 deletions

View File

@ -678,7 +678,7 @@ public class DefaultSolrHighlighter extends SolrHighlighter implements PluginInf
return null;
}
if (params.getFieldBool(fieldName, HighlightParams.HIGHLIGHT_ALTERNATE, true)) {
if (params.getFieldBool(fieldName, HighlightParams.HIGHLIGHT_ALTERNATE, true) && !alternateField.equals(fieldName)) {
// Try to highlight alternate field
Object fieldHighlights = null;
SchemaField schemaField = schema.getFieldOrNull(alternateField);