@@ -1438,13 +1438,15 @@ data MatchQuery =
14381438 , matchQueryAnalyzer :: Maybe Analyzer
14391439 , matchQueryMaxExpansions :: Maybe MaxExpansions
14401440 , matchQueryLenient :: Maybe Lenient
1441− , matchQueryBoost :: Maybe Boost } deriving (Eq, Read, Show, Generic, Typeable)
1441+ , matchQueryBoost :: Maybe Boost
1442+ , matchQueryMinimumShouldMatch :: Maybe Text
1443+ } deriving (Eq, Read, Show, Generic, Typeable)
14421444
14431445{-| 'mkMatchQuery' is a convenience function that defaults the less common parameters,
14441446 enabling you to provide only the 'FieldName' and 'QueryString' to make a 'MatchQuery'
14451447-}
14461448mkMatchQuery :: FieldName -> QueryString -> MatchQuery
1447−mkMatchQuery field query = MatchQuery field query Or ZeroTermsNone Nothing Nothing Nothing Nothing Nothing Nothing
1449+mkMatchQuery field query = MatchQuery field query Or ZeroTermsNone Nothing Nothing Nothing Nothing Nothing Nothing Nothing
14481450
14491451data MatchQueryType =
14501452 MatchPhrase
@@ -2834,7 +2836,9 @@ instance ToJSON MatchQuery where
28342836 toJSON (MatchQuery (FieldName fieldName)
28352837 (QueryString mqQueryString) booleanOperator
28362838 zeroTermsQuery cutoffFrequency matchQueryType
2837− analyzer maxExpansions lenient boost) =
2839+ analyzer maxExpansions lenient boost
2840+ minShouldMatch
2841+ ) =
28382842 object [ fieldName .= omitNulls base ]
28392843 where base = [ "query" .= mqQueryString
28402844 , "operator" .= booleanOperator
@@ -2844,7 +2848,9 @@ instance ToJSON MatchQuery where
28442848 , "analyzer" .= analyzer
28452849 , "max_expansions" .= maxExpansions
28462850 , "lenient" .= lenient
2847− , "boost" .= boost ]
2851+ , "boost" .= boost
2852+ , "minimum_should_match" .= minShouldMatch
2853+ ]
28482854
28492855instance FromJSON MatchQuery where
28502856 parseJSON = withObject "MatchQuery" parse
@@ -2859,6 +2865,7 @@ instance FromJSON MatchQuery where
28592865 <*> o .:? "max_expansions"
28602866 <*> o .:? "lenient"
28612867 <*> o .:? "boost"
2868+ <*> o .:? "minimum_should_match"
28622869
28632870instance ToJSON MultiMatchQuery where
28642871 toJSON (MultiMatchQuery fields (QueryString query) boolOp