@@ -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- 'numericFilters ' => [ ' foo=1 ' ] ,
116+ 'filters ' => " foo:'1' " ,
117117 ]);
118118
119119 $ engine = new AlgoliaEngine ($ client );
@@ -127,12 +127,13 @@ 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- 'numericFilters ' => [ ' foo=1 ' , [ ' bar=1 ' , ' bar=2 ' ]] ,
130+ 'filters ' => " foo:'1' AND ( bar:'1' OR bar:'2') AND (qux:'2' OR qux:'3') " ,
131131 ]);
132132
133133 $ engine = new AlgoliaEngine ($ client );
134134 $ builder = new Builder (new SearchableModel , 'zonda ' );
135- $ builder ->where ('foo ' , 1 )->whereIn ('bar ' , [1 , 2 ]);
135+ $ builder ->where ('foo ' , 1 )->whereIn ('bar ' , [1 , 2 ])
136+ ->whereIn ('qux ' , [2 , 3 ]);
136137 $ engine ->search ($ builder );
137138 }
138139
@@ -141,7 +142,7 @@ public function test_search_sends_correct_parameters_to_algolia_for_empty_where_
141142 $ client = m::mock (SearchClient::class);
142143 $ client ->shouldReceive ('initIndex ' )->with ('table ' )->andReturn ($ index = m::mock (stdClass::class));
143144 $ index ->shouldReceive ('search ' )->with ('zonda ' , [
144- 'numericFilters ' => [ ' foo=1 ' , ' 0=1 ' ] ,
145+ 'filters ' => " foo:'1' AND 0:1 " ,
145146 ]);
146147
147148 $ engine = new AlgoliaEngine ($ client );
0 commit comments