I agree: this crazy floating point specification of distance is hairy to be compatible with 3.x
But i think this is all a huge trap, attached is a patch that:
- removes slow capability from FuzzyTermsEnum
- Cleans up FuzzyQuery: removes float-ctors, allows transpositions as primitive edits, etc.
- adds a deprecated SlowFuzzyQuery to sandbox/ that has the old ctors
- adds a deprecated SlowFuzzyTermsEnum that it uses, which extends FuzzyTermsEnum and adds slowness.
I added a helper static method (deprecated) to FuzzyQuery that converts from the old float sim stuff to number of edits, but ceilinged at what automata support (this is used to easily cut over queryparsers).
All tests pass but patch needs javadocs. Especially I think we should adjust the query syntax and mark the old ~0.xxx stuff as deprecated, since qps can already do do ~1 ~2 now. Then we can really cleanup for 5.0
P.S. patch is huge since i didnt use SVN adds/removes, but makes it easy to apply.