[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:
Ryan Ernst 2014-07-15 14:38:09 -07:00
parent 323210729e
commit 35037e31b2
1 changed files with 2 additions and 0 deletions

View File

@ -465,6 +465,7 @@ public abstract class ValuesSource {
@Override
public int setDocument(int docId) {
script.setNextDocId(docId);
return source.longValues().setDocument(docId);
}
@ -488,6 +489,7 @@ public abstract class ValuesSource {
@Override
public int setDocument(int docId) {
script.setNextDocId(docId);
return source.doubleValues().setDocument(docId);
}