I think we just need two assertEquals() in TestDuelingCodecs for the future.
Good – I added that, it found a bug in SimpleText (only codec that can index offsets currently...) and I fixed that.
For checkindex, long term i think we should really consider adding a (slow, not by default) option to verify
the term vectors against the postings. we could at least turn it on in tests..., but thats another separate issue.
I added that, in one direction (for each TV it seeks the Terms/Docs/AndPositionsEnum to verify everything is the same)... and it uncovered a sneaky bug in Lucene3x codec (not present in 3.x) where we were failing to make a deep copy of the Term before using it as a key in the terms cache... I fixed it.
But i think this is wrong, we must use compareTo >= 0?
Right – I fixed several places that were still doing == or !=. I left ones in non-SimpleText codecs – they are still OK since they refuse to index offsets.
I think this code should start with a min3xFormat-1.
Ahh right! I removed that and just kept FORMAT_FLEX.
Thanks for the reviews Robert and Simon!