Yes, that makes sense.


On 9 May 2014 20:02, Adrien Grand <notifications@github.com> wrote:

> In
> src/main/java/org/elasticsearch/search/aggregations/support/ValuesSource.java:
>
> > +                            if (accepted.get(ord)) {
> > +                                return currentOrd = ord;
> > +                            } else {
> > +                                return currentOrd = Ordinals.MISSING_ORDINAL;
> > +                            }
> > +                        }
> > +
> > +                        @Override
> > +                        public long nextOrd() {
> > +                            return currentOrd = buffer[bufferSlot++];
> > +                        }
> > +
> > +                        @Override
> > +                        public int setDocument(int docId) {
> > +                            int numDocs = inner.setDocument(docId);
> > +                            buffer = new long[numDocs];
>
> maybe we could just have buffer = ArrayUtil.grow(buffer, numDocs)?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/elasticsearch/elasticsearch/pull/6000/files#r12474027>
> .
>



-- 
Met vriendelijke groet,

Martijn van Groningen