mirror of https://github.com/apache/lucene.git
SOLR-8340: Fixed NullPointerException in HighlightComponent.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1716911 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
19b101566d
commit
e32f6e5e67
|
@ -188,6 +188,9 @@ Other Changes
|
||||||
* LUCENE-6900: Added test for score ordered grouping, and refactored TopGroupsResultTransformer.
|
* LUCENE-6900: Added test for score ordered grouping, and refactored TopGroupsResultTransformer.
|
||||||
(David Smiley)
|
(David Smiley)
|
||||||
|
|
||||||
|
* SOLR-8340: Fixed NullPointerException in HighlightComponent.
|
||||||
|
(zengjie via Christine Poerschke)
|
||||||
|
|
||||||
|
|
||||||
================== 5.4.0 ==================
|
================== 5.4.0 ==================
|
||||||
|
|
||||||
|
|
|
@ -190,6 +190,10 @@ public class HighlightComponent extends SearchComponent implements PluginInfoIni
|
||||||
for (int i=0; i<hl.size(); i++) {
|
for (int i=0; i<hl.size(); i++) {
|
||||||
String id = hl.getName(i);
|
String id = hl.getName(i);
|
||||||
ShardDoc sdoc = rb.resultIds.get(id);
|
ShardDoc sdoc = rb.resultIds.get(id);
|
||||||
|
// sdoc maybe null
|
||||||
|
if (sdoc == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
int idx = sdoc.positionInResponse;
|
int idx = sdoc.positionInResponse;
|
||||||
arr[idx] = new NamedList.NamedListEntry<>(id, hl.getVal(i));
|
arr[idx] = new NamedList.NamedListEntry<>(id, hl.getVal(i));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue