@@ -51,11 +51,23 @@ module.exports.tests.scores = function(test, common) {
5151 return { 'score field 4' : 'score value 4' } ;
5252 } ;
5353
54+ var score_view5 = function ( vs ) {
55+ console . assert ( vs !== null ) ;
56+ return { 'score field 5' : 'score value 5' } ;
57+ } ;
58+
59+ var score_view6 = function ( vs ) {
60+ console . assert ( vs !== null ) ;
61+ return { 'score field 6' : 'score value 6' } ;
62+ } ;
63+
5464 var query = new FilteredBooleanQuery ( ) ;
5565 query . score ( score_view1 , 'must' ) ;
5666 query . score ( score_view2 , 'should' ) ;
57- query . score ( score_view3 , 'must' ) ;
58- query . score ( score_view4 , 'should' ) ;
67+ query . score ( score_view3 , 'must_not' ) ;
68+ query . score ( score_view4 , 'must' ) ;
69+ query . score ( score_view5 , 'should' ) ;
70+ query . score ( score_view6 , 'must_not' ) ;
5971
6072 var vs = new VariableStore ( ) ;
6173 vs . var ( 'size' , 'size value' ) ;
@@ -68,12 +80,16 @@ module.exports.tests.scores = function(test, common) {
6880 bool : {
6981 must : [
7082 { 'score field 1' : 'score value 1' } ,
71- { 'score field 3 ' : 'score value 3 ' }
83+ { 'score field 4 ' : 'score value 4 ' }
7284 ] ,
7385 should : [
7486 { 'score field 2' : 'score value 2' } ,
75- { 'score field 4' : 'score value 4' }
76- ]
87+ { 'score field 5' : 'score value 5' }
88+ ] ,
89+ must_not : [
90+ { 'score field 3' : 'score value 3' } ,
91+ { 'score field 6' : 'score value 6' }
92+ ] ,
7793 }
7894 } ,
7995 size : { $ : 'size value' } ,
@@ -119,7 +135,7 @@ module.exports.tests.scores = function(test, common) {
119135
120136 } ) ;
121137
122- test ( 'score with non-must or -should operator specified should be added as \'should\'' , function ( t ) {
138+ test ( 'score with non-must or -must_not or - should operator specified should be added as \'should\'' , function ( t ) {
123139 var score_view = function ( vs ) {
124140 console . assert ( vs !== null ) ;
125141 return { 'score field' : 'score value' } ;
0 commit comments