when using keyword based analayzer on _all, an NPE is thrown since there is no current entry, ignore it (it does not make sense to have keywork analyzer on _all field...)
This commit is contained in:
parent
55ae6b2001
commit
d3978383a5
|
@ -56,12 +56,14 @@ public class AllTokenStream extends TokenFilter {
|
||||||
if (!input.incrementToken()) {
|
if (!input.incrementToken()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (allEntries.current() != null) {
|
||||||
float boost = allEntries.current().boost();
|
float boost = allEntries.current().boost();
|
||||||
if (boost != 1.0f) {
|
if (boost != 1.0f) {
|
||||||
payloadAttribute.setPayload(new Payload(encodeFloat(boost)));
|
payloadAttribute.setPayload(new Payload(encodeFloat(boost)));
|
||||||
} else {
|
} else {
|
||||||
payloadAttribute.setPayload(null);
|
payloadAttribute.setPayload(null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue