Right, initially I used an ArrayList to have dynamic sizing, but then decided for arrays (out of perf/mem reasons ;-)). The ordinal is afaiu the max number of values in any document which can of course vary between documents. So you are right, that I might be over-allocating here. Of course it will heavily depend on the data as well. I could switch back to lists or one could alternatively resize the array before returning it. This would also mean I don't have to do special null handling when processing the array. Not sure what the best approach would be. WDYT?