mirror of
https://github.com/apache/lucene.git
synced 2025-02-13 05:25:50 +00:00
SOLR-9237: DefaultSolrHighlighter.doHighlightingByFastVectorHighlighter can't be overidden
(cherry picked from commit 7eb7702)
This commit is contained in:
parent
d1a047ad6f
commit
319f89210a
@ -50,6 +50,8 @@ Bug Fixes
|
|||||||
|
|
||||||
* SOLR-8546: SOLR-8546: TestLazyCores is failing a lot on the Jenkins cluster. (Erick Erickson)
|
* 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
|
Optimizations
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
@ -389,7 +389,7 @@ public class DefaultSolrHighlighter extends SolrHighlighter implements PluginInf
|
|||||||
preFetchFieldNames.add(keyField.getName());
|
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
|
IndexReader reader = new TermVectorReusingLeafReader(req.getSearcher().getLeafReader()); // SOLR-5855
|
||||||
|
|
||||||
@ -422,7 +422,7 @@ public class DefaultSolrHighlighter extends SolrHighlighter implements PluginInf
|
|||||||
return fragments;
|
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,
|
FvhContainer fvhContainer, Query query, IndexReader reader, SolrQueryRequest req,
|
||||||
SolrParams params) throws IOException {
|
SolrParams params) throws IOException {
|
||||||
Object fieldHighlights;
|
Object fieldHighlights;
|
||||||
@ -740,9 +740,14 @@ public class DefaultSolrHighlighter extends SolrHighlighter implements PluginInf
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wraps FVH to allow pass-by-reference
|
// Wraps FVH to allow pass-by-reference
|
||||||
private class FvhContainer {
|
protected class FvhContainer {
|
||||||
private FastVectorHighlighter fvh;
|
FastVectorHighlighter fvh;
|
||||||
private FieldQuery fieldQuery;
|
FieldQuery fieldQuery;
|
||||||
|
|
||||||
|
FvhContainer(FastVectorHighlighter fvh, FieldQuery fieldQuery) {
|
||||||
|
this.fvh = fvh;
|
||||||
|
this.fieldQuery = fieldQuery;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user