[AGGS] Pass current docid being processed to scripts.
Scripts may internally cache based on docid (as expressions do). This change makes numeric aggregations using scripts pass the docid when it changes.
This commit is contained in:
parent
323210729e
commit
35037e31b2
|
@ -465,6 +465,7 @@ public abstract class ValuesSource {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int setDocument(int docId) {
|
public int setDocument(int docId) {
|
||||||
|
script.setNextDocId(docId);
|
||||||
return source.longValues().setDocument(docId);
|
return source.longValues().setDocument(docId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -488,6 +489,7 @@ public abstract class ValuesSource {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int setDocument(int docId) {
|
public int setDocument(int docId) {
|
||||||
|
script.setNextDocId(docId);
|
||||||
return source.doubleValues().setDocument(docId);
|
return source.doubleValues().setDocument(docId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue