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:37:43 UTC

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

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

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


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

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

    Code comment only change
    
    (cherry picked from commit 0767a9d4d7d2ed97fe60da6d8e561e7b76f6da6d)
---
 .../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) {