@@ -50,6 +50,9 @@ public interface IMultiMatchQuery : IQuery
50
50
[ JsonProperty ( PropertyName = "tie_breaker" ) ]
51
51
double ? TieBreaker { get ; set ; }
52
52
53
+ [ JsonProperty ( PropertyName = "minimum_should_match" ) ]
54
+ string MinimumShouldMatch { get ; set ; }
55
+
53
56
[ JsonProperty ( PropertyName = "operator" ) ]
54
57
[ JsonConverter ( typeof ( StringEnumConverter ) ) ]
55
58
Operator ? Operator { get ; set ; }
@@ -78,6 +81,7 @@ protected override void WrapInContainer(IQueryContainer container)
78
81
public double ? Boost { get ; set ; }
79
82
public bool ? UseDisMax { get ; set ; }
80
83
public double ? TieBreaker { get ; set ; }
84
+ public string MinimumShouldMatch { get ; set ; }
81
85
public Operator ? Operator { get ; set ; }
82
86
public IEnumerable < PropertyPathMarker > Fields { get ; set ; }
83
87
}
@@ -109,6 +113,8 @@ public class MultiMatchQueryDescriptor<T> : IMultiMatchQuery where T : class
109
113
110
114
double ? IMultiMatchQuery . TieBreaker { get ; set ; }
111
115
116
+ string IMultiMatchQuery . MinimumShouldMatch { get ; set ; }
117
+
112
118
Operator ? IMultiMatchQuery . Operator { get ; set ; }
113
119
114
120
IEnumerable < PropertyPathMarker > IMultiMatchQuery . Fields { get ; set ; }
@@ -153,6 +159,7 @@ public MultiMatchQueryDescriptor<T> Query(string query)
153
159
( ( IMultiMatchQuery ) this ) . Query = query ;
154
160
return this ;
155
161
}
162
+
156
163
public MultiMatchQueryDescriptor < T > Analyzer ( string analyzer )
157
164
{
158
165
( ( IMultiMatchQuery ) this ) . Analyzer = analyzer ;
@@ -169,6 +176,12 @@ public MultiMatchQueryDescriptor<T> CutoffFrequency(double cutoffFrequency)
169
176
return this ;
170
177
}
171
178
179
+ public MultiMatchQueryDescriptor < T > MinimumShouldMatch ( string minimumShouldMatch )
180
+ {
181
+ ( ( IMultiMatchQuery ) this ) . MinimumShouldMatch = minimumShouldMatch ;
182
+ return this ;
183
+ }
184
+
172
185
public MultiMatchQueryDescriptor < T > Rewrite ( RewriteMultiTerm rewrite )
173
186
{
174
187
( ( IMultiMatchQuery ) this ) . Rewrite = rewrite ;
0 commit comments