I think the byte version was better since it is consitent with PointPangeQuery which exposes the low/high bounds as a byte?
Good point. I'll change that.
Also I don't think it is true that the sortedPackedPoints iterator makes a copy: looking at PrefixCodedTerms, it seems to be reusing the same BytesRef object?
True... we need to make a copy. I guess what I was confused with is the copy that PrefixCodedTerms makes from the input, but if it is reusing the BytesRef it copies into then a copy is required if we return the points in a collection.
Something else we should do is throwing a NoSuchElementException in the Iterator whin upTo==size to comply with the Iterator API.