You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2020/02/12 00:33:01 UTC

[lucene-solr] branch master updated: Code comment only change

This is an automated email from the ASF dual-hosted git repository.

erick pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 0767a9d  Code comment only change
0767a9d is described below

commit 0767a9d4d7d2ed97fe60da6d8e561e7b76f6da6d
Author: Erick Erickson <Er...@gmail.com>
AuthorDate: Tue Feb 11 19:32:54 2020 -0500

    Code comment only change
---
 .../java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java
index 4a0d13e..dfd1bc1 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java
@@ -324,6 +324,8 @@ class FacetFieldProcessorByArrayDV extends FacetFieldProcessorByArray {
     int ord = (toGlobal != null && segOrd >= 0) ? (int)toGlobal.get(segOrd) : segOrd;
 
     int arrIdx = ord - startTermIndex;
+    // This code handles faceting prefixes, which narrows the range of ords we want to collect.
+    // It’s not an error for an ord to fall outside this range… we simply want to skip it.
     if (arrIdx >= 0 && arrIdx < nTerms) {
       countAcc.incrementCount(arrIdx, 1);
       if (collectAcc != null) {