final String value = RandomPicks.randomFrom(getRandom(), values);
if (value != null) {
parent.add(new StringField("text", value, Store.YES));
}
docs.add(parent);
int bit = parents.prevSetBit(parents.length() - 1) + docs.size();
parents = FixedBitSet.ensureCapacity(parents, bit);
parents.set(bit);
writer.addDocuments(docs);
if (randomInt(10) == 0) {
writer.commit();