This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new b2d32ce SOLR-15856: Fix Lucene bug in facet prefix (#700)
b2d32ce is described below
commit b2d32ce120c695b8e1338d23220d9d3f03db2b54
Author: Houston Putman <[email protected]>
AuthorDate: Thu Feb 24 18:43:42 2022 -0500
SOLR-15856: Fix Lucene bug in facet prefix (#700)
---
solr/core/src/java/org/apache/solr/request/DocValuesFacets.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java
b/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java
index c140a45..35e23f9 100644
--- a/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java
+++ b/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java
@@ -103,7 +103,7 @@ public class DocValuesFacets {
}
int startTermIndex, endTermIndex;
- if (prefix!=null) {
+ if (prefix!=null && si.getValueCount() > 0) {
startTermIndex = (int) si.lookupTerm(prefixRef.get());
if (startTermIndex<0) startTermIndex=-startTermIndex-1;
prefixRef.append(UnicodeUtil.BIG_TERM);