@@ -845,6 +845,7 @@ data MatchQuery = MatchQuery
845845 , matchQueryLenient :: Maybe Lenient
846846 , matchQueryBoost :: Maybe Boost
847847 , matchQueryMinimumShouldMatch :: Maybe Text
848+ , matchQueryFuzziness :: Maybe Fuzziness
848849 } deriving (Eq, Show)
849850
850851
@@ -853,7 +854,7 @@ instance ToJSON MatchQuery where
853854 (QueryString mqQueryString) booleanOperator
854855 zeroTermsQuery cutoffFrequency matchQueryType
855856 analyzer maxExpansions lenient boost
856− minShouldMatch
857+ minShouldMatch mqFuzziness
857858 ) =
858859 object [ fieldName .= omitNulls base ]
859860 where base = [ "query" .= mqQueryString
@@ -866,6 +867,7 @@ instance ToJSON MatchQuery where
866867 , "lenient" .= lenient
867868 , "boost" .= boost
868869 , "minimum_should_match" .= minShouldMatch
870+ , "fuzziness" .= mqFuzziness
869871 ]
870872
871873instance FromJSON MatchQuery where
@@ -882,12 +884,13 @@ instance FromJSON MatchQuery where
882884 <*> o .:? "lenient"
883885 <*> o .:? "boost"
884886 <*> o .:? "minimum_should_match"
887+ <*> o .:? "fuzziness"
885888
886889{-| 'mkMatchQuery' is a convenience function that defaults the less common parameters,
887890 enabling you to provide only the 'FieldName' and 'QueryString' to make a 'MatchQuery'
888891-}
889892mkMatchQuery :: FieldName -> QueryString -> MatchQuery
890−mkMatchQuery field query = MatchQuery field query Or ZeroTermsNone Nothing Nothing Nothing Nothing Nothing Nothing Nothing
893+mkMatchQuery field query = MatchQuery field query Or ZeroTermsNone Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
891894
892895data MatchQueryType =
893896 MatchPhrase