elasticsearch/elasticsearch-net — pull request #941 by andersosthus (2014-09-11 17:26:03+00:00)
Title: Fuzziness alignment for MatchQueryDescriptor

Allows a Match query to take one of the following for Fuzziness:
- .Fuzziness() (for Auto)
- .Fuzziness(double)
- .Fuzziness(int)

This matches the docs at http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_boolean

I've seen that there are two ways this kind of fuzziness is implemented in Nest.
There is this style that's used in some of the Suggestors, like the FuzzySuggestDescriptor: https://github.com/elasticsearch/elasticsearch-net/blob/develop/src/Nest/DSL/Suggest/FuzzySuggestDescriptor.cs

And then there is another style, basically taking all fuzziness values and calling .ToString() on it so they can all fit in a String field. This is used in the FuzzyQueryDescriptor: https://github.com/elasticsearch/elasticsearch-net/blob/develop/src/Nest/DSL/Query/FuzzyQueryDescriptor.cs

I feel the IFuzziness way is cleaner :)

This PR does not break anything, since the signature still matches the old signature. The main thing I don't like is the changes I had to do to MatchQueryJsonConverter.cs, to have the Fuzziness deserialize properly. I see that there is a FuzzinessConverter already that does the same thing, but not sure how I could use that from the ReadJson in the MatchQueryJsonConverter.