count = 0;
for (String type : types()) {
final SortedDocValues values = getOrdinalsValues(type);
final int ord = values.getOrd(docId);
if (ord >= 0) {
terms[count++] = values.lookupOrd(ord);
}
}
assert count <= 2 : "A single doc can potentially be both parent and child, so the maximum allowed values is 2";
if (count > 1) {
int cmp = terms[0].compareTo(terms[1]);