File tree 1 file changed +3
-14
lines changed
src/Tests/Nest.Tests.Unit/Search/Query/Singles
1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ public void MatchQuery()
16
16
. Match ( t=> t
17
17
. OnField ( f=> f . Name )
18
18
. Query ( "this is a test" )
19
+ . MinimumShouldMatch ( "2<80%" )
19
20
. Rewrite ( RewriteMultiTerm . ConstantScoreDefault )
20
21
)
21
22
) ;
@@ -26,25 +27,13 @@ public void MatchQuery()
26
27
match: {
27
28
name : {
28
29
query : ""this is a test"",
29
- rewrite: ""constant_score_default""
30
+ rewrite: ""constant_score_default"",
31
+ minimum_should_match: ""2<80%""
30
32
}
31
33
}
32
34
}
33
35
}" ;
34
36
Assert . True ( json . JsonEquals ( expected ) , json ) ;
35
- s = new SearchDescriptor < ElasticsearchProject > ( )
36
- . From ( 0 )
37
- . Size ( 10 )
38
- . Query ( q=> q
39
- . Match ( t=> t
40
- . OnField ( f=> f . Name )
41
- . Query ( "this is a test" )
42
- . Rewrite ( RewriteMultiTerm . ConstantScoreDefault )
43
- )
44
- ) ;
45
-
46
- json = TestElasticClient . Serialize ( s ) ;
47
- Assert . True ( json . JsonEquals ( expected ) , json ) ;
48
37
}
49
38
50
39
[ Test ]
You can’t perform that action at this time.
0 commit comments