bitemyapp / bloodhound

Haskell Elasticsearch client and query DSL
bitemyapp.com
BSD 3-Clause "New" or "Revised" License
424 stars 118 forks source link

Match query fuzziness #241

Closed ashutoshrishi closed 5 years ago

ashutoshrishi commented 6 years ago

This enables a "fuzziness" option for a Match Query: https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness

  1. MatchQuery has a new field matchQueryFuzziness to add a "fuzziness" value
  2. A Fuzziness value can be also created with an empty constructor FuzzinessAuto which sets fuzziness to a string value of "AUTO"

I added a test for a fuzzy match query which works, but I am having trouble fixing some quick check JSON isomorphic tests. I have little experience with quick check and it seems random properties fail Never mind, it's all green here.

Resolves #240

bitemyapp commented 6 years ago

Could you please add the elastic documentation link to the source code above the modified fuzziness type?

Please add yourself to the changelog as well.

ashutoshrishi commented 6 years ago

@bitemyapp I added your requested changes, only documentation changes, but the tests failed this time (they passed on my fork).

Two of the travis runs timed out for some reason, I cannot restart it from here without another push.

bitemyapp commented 6 years ago

I bumped the tests.

ashutoshrishi commented 6 years ago

Thanks! The checks passed, have I added the documentation in the right places?

ashutoshrishi commented 6 years ago

@bitemyapp is this good to merge?

bitemyapp commented 5 years ago

@ashutoshrishi Thank you!