Optimization
This commit is contained in:
parent
dfce6cd725
commit
adb490371f
@ -72,7 +72,7 @@ public class FastFacetsCollectorManager implements CollectorManager<FacetsCollec
|
||||
|
||||
@Override
|
||||
public void collect(int doc) throws IOException {
|
||||
if (hash.hashCode(doc) % collectionRate == 0) {
|
||||
if (collectionRate == 1 || hash.hashCode(doc) % collectionRate == 0) {
|
||||
leafCollector.collect(doc);
|
||||
}
|
||||
}
|
||||
|
@ -47,11 +47,12 @@ public class FastRandomSamplingFacetsCollector extends SimpleCollector implement
|
||||
|
||||
@Override
|
||||
public void collect(int doc) throws IOException {
|
||||
if (hash.hashCode(doc) % collectionRate == 0) {
|
||||
if (collectionRate == 1 || hash.hashCode(doc) % collectionRate == 0) {
|
||||
collector.collect(doc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ScoreMode scoreMode() {
|
||||
return collector.scoreMode();
|
||||
|
Loading…
Reference in New Issue
Block a user