lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jan...@apache.org
Subject lucene-solr:branch_6x: SOLR-8583: Do not attempt highlight of alternate if it is same as original hl field (cherry picked from commit 05ce40a)
Date Mon, 30 May 2016 08:26:03 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 3a74daab2 -> a460addd2


SOLR-8583: Do not attempt highlight of alternate if it is same as original hl field
(cherry picked from commit 05ce40a)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a460addd
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a460addd
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a460addd

Branch: refs/heads/branch_6x
Commit: a460addd2f9511432da7684bd2ee6598025389ea
Parents: 3a74daa
Author: Jan Høydahl <janhoy@apache.org>
Authored: Mon May 30 10:24:23 2016 +0200
Committer: Jan Høydahl <janhoy@apache.org>
Committed: Mon May 30 10:25:55 2016 +0200

----------------------------------------------------------------------
 .../src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a460addd/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java b/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
index 08ae037..9941b16 100644
--- a/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
+++ b/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
@@ -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);


Mime
View raw message