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