@@ -21,6 +21,9 @@ public interface IMoreLikeThisQuery : IQuery
2121 [ JsonProperty ( PropertyName = "percent_terms_to_match" ) ]
2222 double ? TermMatchPercentage { get ; set ; }
2323
24+ [ JsonProperty ( PropertyName = "minimum_should_match" ) ]
25+ string MinimumShouldMatch { get ; set ; }
26+
2427 [ JsonProperty ( PropertyName = "stop_words" ) ]
2528 IEnumerable < string > StopWords { get ; set ; }
2629
@@ -84,6 +87,7 @@ protected override void WrapInContainer(IQueryContainer container)
8487 public IEnumerable < PropertyPathMarker > Fields { get ; set ; }
8588 public string LikeText { get ; set ; }
8689 public double ? TermMatchPercentage { get ; set ; }
90+ public string MinimumShouldMatch { get ; set ; }
8791 public IEnumerable < string > StopWords { get ; set ; }
8892 public int ? MinTermFrequency { get ; set ; }
8993 public int ? MaxQueryTerms { get ; set ; }
@@ -108,7 +112,9 @@ public class MoreLikeThisQueryDescriptor<T> : IMoreLikeThisQuery where T : class
108112 string IMoreLikeThisQuery . LikeText { get ; set ; }
109113
110114 double ? IMoreLikeThisQuery . TermMatchPercentage { get ; set ; }
111-
115+
116+ string IMoreLikeThisQuery . MinimumShouldMatch { get ; set ; }
117+
112118 IEnumerable < string > IMoreLikeThisQuery . StopWords { get ; set ; }
113119
114120 int ? IMoreLikeThisQuery . MinTermFrequency { get ; set ; }
@@ -212,6 +218,19 @@ public MoreLikeThisQueryDescriptor<T> TermMatchPercentage(double termMatchPercen
212218 this . Self . TermMatchPercentage = termMatchPercentage ;
213219 return this ;
214220 }
221+
222+ public MoreLikeThisQueryDescriptor < T > MinimumShouldMatch ( string minMatch )
223+ {
224+ this . Self . MinimumShouldMatch = minMatch ;
225+ return this ;
226+ }
227+
228+ public MoreLikeThisQueryDescriptor < T > MinimumShouldMatch ( int minMatch )
229+ {
230+ this . Self . MinimumShouldMatch = minMatch . ToString ( ) ;
231+ return this ;
232+ }
233+
215234 public MoreLikeThisQueryDescriptor < T > Boost ( double boost )
216235 {
217236 this . Self . Boost = boost ;
0 commit comments