lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jan...@apache.org
Subject lucene-solr:master: SOLR-9237: DefaultSolrHighlighter.doHighlightingByFastVectorHighlighter can't be overidden
Date Sun, 26 Jun 2016 23:12:14 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 46c827e31 -> 7eb77027b


SOLR-9237: DefaultSolrHighlighter.doHighlightingByFastVectorHighlighter can't be overidden


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

Branch: refs/heads/master
Commit: 7eb77027bb322a562bca17d23323f95ce58dd9d6
Parents: 46c827e
Author: Jan Høydahl <janhoy@apache.org>
Authored: Sun Jun 26 23:59:59 2016 +0200
Committer: Jan Høydahl <janhoy@apache.org>
Committed: Sun Jun 26 23:59:59 2016 +0200

----------------------------------------------------------------------
 solr/CHANGES.txt                                     |  2 ++
 .../solr/highlight/DefaultSolrHighlighter.java       | 15 ++++++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7eb77027/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index fac2030..4cea5c3 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -82,6 +82,8 @@ Bug Fixes
 
 * SOLR-8546: SOLR-8546: TestLazyCores is failing a lot on the Jenkins cluster. (Erick Erickson)
 
+* SOLR-9237: DefaultSolrHighlighter.doHighlightingByFastVectorHighlighter can't be overidden
(janhoy)
+
 Optimizations
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7eb77027/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 9941b16..ca481cd 100644
--- a/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
+++ b/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
@@ -389,7 +389,7 @@ public class DefaultSolrHighlighter extends SolrHighlighter implements
PluginInf
       preFetchFieldNames.add(keyField.getName());
     }
 
-    FvhContainer fvhContainer = new FvhContainer(); // Lazy container for fvh and fieldQuery
+    FvhContainer fvhContainer = new FvhContainer(null, null); // Lazy container for fvh and
fieldQuery
 
     IndexReader reader = new TermVectorReusingLeafReader(req.getSearcher().getLeafReader());
// SOLR-5855
 
@@ -422,7 +422,7 @@ public class DefaultSolrHighlighter extends SolrHighlighter implements
PluginInf
     return fragments;
   }
 
-  private Object doHighlightingOfField(Document doc, int docId, SchemaField schemaField,
+  protected Object doHighlightingOfField(Document doc, int docId, SchemaField schemaField,
                                        FvhContainer fvhContainer, Query query, IndexReader
reader, SolrQueryRequest req,
                                        SolrParams params) throws IOException {
     Object fieldHighlights;
@@ -740,9 +740,14 @@ public class DefaultSolrHighlighter extends SolrHighlighter implements
PluginInf
   }
 
   // Wraps FVH to allow pass-by-reference
-  private class FvhContainer {
-    private FastVectorHighlighter fvh;
-    private FieldQuery fieldQuery;
+  protected class FvhContainer {
+    FastVectorHighlighter fvh;
+    FieldQuery fieldQuery;
+
+    FvhContainer(FastVectorHighlighter fvh, FieldQuery fieldQuery) {
+      this.fvh = fvh;
+      this.fieldQuery = fieldQuery;
+    }
   }
 }
 


Mime
View raw message