@@ -113,7 +113,7 @@ public function test_search_sends_correct_parameters_to_algolia()
113113 $ client = m::mock (SearchClient::class);
114114 $ client ->shouldReceive ('initIndex ' )->with ('table ' )->andReturn ($ index = m::mock (stdClass::class));
115115 $ index ->shouldReceive ('search ' )->with ('zonda ' , [
116- 'filters ' => " foo:'1' " ,
116+ 'numericFilters ' => [ ' foo=1 ' ] ,
117117 ]);
118118
119119 $ engine = new AlgoliaEngine ($ client );
@@ -127,13 +127,12 @@ public function test_search_sends_correct_parameters_to_algolia_for_where_in_sea
127127 $ client = m::mock (SearchClient::class);
128128 $ client ->shouldReceive ('initIndex ' )->with ('table ' )->andReturn ($ index = m::mock (stdClass::class));
129129 $ index ->shouldReceive ('search ' )->with ('zonda ' , [
130- 'filters ' => " foo:'1' AND (bar:'1' OR bar:'2') AND (qux:'2' OR qux:'3') " ,
130+ 'numericFilters ' => [ ' foo=1 ' , [ ' bar=1 ' , ' bar=2 ' ]] ,
131131 ]);
132132
133133 $ engine = new AlgoliaEngine ($ client );
134134 $ builder = new Builder (new SearchableModel , 'zonda ' );
135- $ builder ->where ('foo ' , 1 )->whereIn ('bar ' , [1 , 2 ])
136- ->whereIn ('qux ' , [2 , 3 ]);
135+ $ builder ->where ('foo ' , 1 )->whereIn ('bar ' , [1 , 2 ]);
137136 $ engine ->search ($ builder );
138137 }
139138
@@ -142,7 +141,7 @@ public function test_search_sends_correct_parameters_to_algolia_for_empty_where_
142141 $ client = m::mock (SearchClient::class);
143142 $ client ->shouldReceive ('initIndex ' )->with ('table ' )->andReturn ($ index = m::mock (stdClass::class));
144143 $ index ->shouldReceive ('search ' )->with ('zonda ' , [
145- 'filters ' => " foo:'1' AND 0:1 " ,
144+ 'numericFilters ' => [ ' foo=1 ' , ' 0=1 ' ] ,
146145 ]);
147146
148147 $ engine = new AlgoliaEngine ($ client );
0 commit comments