mirror of https://github.com/apache/lucene.git
SOLR-12964: Use DocValuesIterator.advanceExact() instead of the advance()/docID() pattern
This commit is contained in:
parent
1b084db901
commit
243a8a668a
|
@ -293,6 +293,9 @@ Improvements
|
|||
* LUCENE-8557: Some internal LeafReader.getFieldInfos implementations were being re-computed on-demand instead of
|
||||
once up front leading to some slowdowns in places like JSON Facets and field collapsing. (Tim Underwood, David Smiley)
|
||||
|
||||
* SOLR-12964: Json Facets: use DocValuesIterator advanceExact() instead of advance() in FacetFieldProcessorByHashDV and
|
||||
UniqueSinglevaluedSlotAcc. (Tim Underwood)
|
||||
|
||||
================== 7.5.0 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||
|
|
|
@ -361,10 +361,7 @@ class FacetFieldProcessorByHashDV extends FacetFieldProcessor {
|
|||
|
||||
@Override
|
||||
public void collect(int segDoc) throws IOException {
|
||||
if (segDoc > docValues.docID()) {
|
||||
docValues.advance(segDoc);
|
||||
}
|
||||
if (segDoc == docValues.docID()) {
|
||||
if (docValues.advanceExact(segDoc)) {
|
||||
long val = toGlobal.get(docValues.ordValue());
|
||||
collectValFirstPhase(segDoc, val);
|
||||
}
|
||||
|
|
|
@ -75,10 +75,7 @@ class UniqueSinglevaluedSlotAcc extends UniqueSlotAcc {
|
|||
|
||||
@Override
|
||||
public void collect(int doc, int slotNum, IntFunction<SlotContext> slotContext) throws IOException {
|
||||
if (doc > subDv.docID()) {
|
||||
subDv.advance(doc);
|
||||
}
|
||||
if (doc == subDv.docID()) {
|
||||
if (subDv.advanceExact(doc)) {
|
||||
int segOrd = subDv.ordValue();
|
||||
int ord = toGlobal==null ? segOrd : (int)toGlobal.get(segOrd);
|
||||
|
||||
|
|
Loading…
Reference in New Issue