Thanks Jim Ferenczi, this looks very close!
For SimpleText, could we use "multi_valued_string" instead of "sorted_string" to describe it in the segment info format?
Can we also name the new tests with "multi valued" instead of "sorted", e.g. testBasicSortedLong --> testMultiValuedLong?
Can we change this:
throw new IllegalStateException("Unexpected SortedNumericSortField type: " + sortField.getType());
throw new IllegalStateException("Unexpected SortedNumericSortField " + sortField);
Just so we get more information if we ever do hit these exceptions...
static final int VERSION_CURRENT = 1;
Can you introduce a separate constant for the value 1? E.g.:
static final int VERSION_MULTI_VALUED_SORT = 1;
static final int VERSION_CURRENT = VERSION_MULTI_VALUED_SORT;
It just gives us a bit more info about why the format change happened.
Hmm, I see we have no back-compat testing of sorted indices ... I'll
open an issue to fix that. Once this change is released to the wild
(6.4.0), we have to improve that to include multi-valued sort ... I'll
do that too.