Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Feb 10, 2025
1 parent cf7492c commit 40c461d
Showing 1 changed file with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,20 +220,23 @@ boolean tryCollectFromTermFrequencies(LeafReaderContext ctx, SortedSetDocValues
@Override
protected boolean tryPrecomputeAggregationForLeaf(LeafReaderContext ctx) throws IOException {
SortedSetDocValues globalOrds = valuesSource.globalOrdinalsValues(ctx);
collectionStrategy.globalOrdsReady(globalOrds);

// if (collectionStrategy instanceof DenseGlobalOrds
// && this.resultStrategy instanceof StandardTermsResults
// && sub == LeafBucketCollector.NO_OP_COLLECTOR) {
// LeafBucketCollector termDocFreqCollector = termDocFreqCollector(
// ctx,
// globalOrds,
// (ord, docCount) -> incrementBucketDocCount(collectionStrategy.globalOrdToBucketOrd(0, ord), docCount)
// );
// if (termDocFreqCollector != null) {
// return termDocFreqCollector;
// }
// }
if (collectionStrategy instanceof DenseGlobalOrds
&& this.resultStrategy instanceof StandardTermsResults
&& subAggregators.length == 0) {
return tryCollectFromTermFrequencies(
ctx,
globalOrds,
(ord, docCount) -> incrementBucketDocCount(collectionStrategy.globalOrdToBucketOrd(0, ord), docCount)
);
}
return false;
}

@Override
public LeafBucketCollector getLeafCollector(LeafReaderContext ctx, LeafBucketCollector sub) throws IOException {
SortedSetDocValues globalOrds = valuesSource.globalOrdinalsValues(ctx);
collectionStrategy.globalOrdsReady(globalOrds);

SortedDocValues singleValues = DocValues.unwrapSingleton(globalOrds);
if (singleValues != null) {
Expand Down

0 comments on commit 40c461d

Please sign in to comment.