Hmm, I noticed i left a s.o.p in the previous patch for preflex, but it wasn't being called from CheckIndex.
This is because we always wrap PreFlex inside PerFieldCodecWrapper... even if its a 3.x index! This is a problem as it still perpetuates the loss of IR.numUniqueTerms.
So in this patch we no longer do this, which means I'm able to remove the assume as well.
But, now that preflex is being tested I think I've found an off-by-one with this statistic when the field name is the empty string.
I'm gonna see if i can make a testcase/issue against 3.x separately for this... because this patch is already too big.
NOTE: reproduce with: ant test -Dtestcase=TestIndexWriter -Dtestmethod=testEmptyFieldName -Dtests.seed=57fd2807ecfb5a2b:5556d32d3a1f68b7:469f7ed779c63825 -Dtests.codec=PreFlex