static int accumSingle(int counts[],int docBase,FieldFacetStats[] facetStats,SortedDocValues si,DocIdSetIterator disi,int subIndex,OrdinalMap map) throws IOException {
  final LongValues ordMap=map == null ? null : map.getGlobalOrds(subIndex);
  int missingDocCount=0;
  int doc;
  while ((doc=disi.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
    int term=si.getOrd(doc);
    if (term >= 0) {
      if (map != null) {
        term=(int)ordMap.get(term);
      }
      counts[term]++;
      for (      FieldFacetStats f : facetStats) {
        f.facetTermNum(docBase + doc,term);
      }
    }
 else {
      for (      FieldFacetStats f : facetStats) {
        f.facetMissingNum(docBase + doc);
      }
      missingDocCount++;
    }
  }
  return missingDocCount;
}

static int accumSingle ( int counts [ ] , int docBase , FieldFacetStats [ ] facetStats , SortedDocValues si , DocIdSetIterator disi , int subIndex , OrdinalMap map ) throws IOException { final LongValues ordMap = map == null ? null : map . getGlobalOrds ( subIndex ) ; int missingDocCount = 0 ; int doc ; while ( ( doc = disi . nextDoc ( ) ) != DocIdSetIterator . NO_MORE_DOCS ) { int term = si . getOrd ( doc ) ; if ( term >= 0 ) { if ( map != null ) { term = ( int ) ordMap . get ( term ) ; } counts [ term ] ++ ; for ( FieldFacetStats f : facetStats ) { f . facetTermNum ( docBase + doc , term ) ; } } else { for ( FieldFacetStats f : facetStats ) { f . facetMissingNum ( docBase + doc ) ; } missingDocCount ++ ; } } return missingDocCount ; }
accumulates per - segment single - valued stats
