@@ -200,14 +200,14 @@ func TestNoIndex(t *testing.T) {
200200 assert .Nil (t , err )
201201 assert .Equal (t , 0 , total )
202202
203- _ , total , err = c .Search (NewQuery ("@f2:Mark*" ))
203+ _ , total , _ = c .Search (NewQuery ("@f2:Mark*" ))
204204 assert .Equal (t , 2 , total )
205205
206- docs , total , err := c .Search (NewQuery ("@f2:Mark*" ).SetSortBy ("f1" , false ))
206+ docs , total , _ := c .Search (NewQuery ("@f2:Mark*" ).SetSortBy ("f1" , false ))
207207 assert .Equal (t , 2 , total )
208208 assert .Equal (t , "TestNoIndex-doc1" , docs [0 ].Id )
209209
210- docs , total , err = c .Search (NewQuery ("@f2:Mark*" ).SetSortBy ("f1" , true ))
210+ docs , total , _ = c .Search (NewQuery ("@f2:Mark*" ).SetSortBy ("f1" , true ))
211211 assert .Equal (t , 2 , total )
212212 assert .Equal (t , "TestNoIndex-doc2" , docs [0 ].Id )
213213 teardown (c )
@@ -439,7 +439,7 @@ func TestFilter(t *testing.T) {
439439 assert .Equal (t , 1 , total )
440440 assert .Equal (t , "18" , docs [0 ].Properties ["age" ])
441441
442- docs , total , err = c .Search (NewQuery ("hello world" ).
442+ _ , total , err = c .Search (NewQuery ("hello world" ).
443443 AddFilter (Filter {Field : "location" , Options : GeoFilterOptions {Lon : 10 , Lat : 13 , Radius : 1 , Unit : KILOMETERS }}).
444444 SetSortBy ("age" , true ).
445445 SetReturnFields ("body" ))
@@ -511,6 +511,29 @@ func TestReturnFields(t *testing.T) {
511511 assert .Equal (t , "25" , docs [0 ].Properties ["years" ])
512512}
513513
514+ func TestNoStopWords (t * testing.T ) {
515+ c := createClient ("testung" )
516+
517+ sc := NewSchema (DefaultOptions ).
518+ AddField (NewTextField ("title" ))
519+ c .Drop ()
520+
521+ err := c .CreateIndex (sc )
522+ assert .Nil (t , err )
523+
524+ vanillaConnection := c .pool .Get ()
525+ _ , err = vanillaConnection .Do ("HSET" , "doc1" , "title" , "hello world" )
526+ assert .Nil (t , err )
527+
528+ // Searching
529+ _ , total , err := c .Search (NewQuery ("hello a world" ).SetFlags ((QueryNoContent )))
530+ assert .Nil (t , err )
531+ assert .Equal (t , 1 , total )
532+ _ , total , err = c .Search (NewQuery ("hello a world" ).SetFlags ((QueryNoContent | QueryWithStopWords )))
533+ assert .Nil (t , err )
534+ assert .Equal (t , 0 , total )
535+ }
536+
514537func TestParams (t * testing.T ) {
515538 c := createClient ("TestParams" )
516539 version , _ := c .getRediSearchVersion ()
0 commit comments