@@ -220,51 +220,51 @@ def test_custom_search_params_with_sort_string(index_with_documents):
220
220
update = index .update_sortable_attributes (['title' ])
221
221
index .wait_for_pending_update (update ['updateId' ])
222
222
response = index .search (
223
- 'world ' ,
223
+ 'dark ' ,
224
224
{
225
225
'sort' : ['title:asc' ]
226
226
}
227
227
)
228
228
assert isinstance (response , dict )
229
- assert len (response ['hits' ]) == 12
229
+ assert len (response ['hits' ]) == 2
230
230
assert 'facetsDistribution' not in response
231
231
assert 'exhaustiveFacetsCount' not in response
232
- assert response ['hits' ][0 ]['title' ] == 'Alita: Battle Angel '
233
- assert response ['hits' ][1 ]['title' ] == 'Aquaman '
232
+ assert response ['hits' ][0 ]['title' ] == 'After '
233
+ assert response ['hits' ][1 ]['title' ] == 'Dumbo '
234
234
235
235
def test_custom_search_params_with_sort_int (index_with_documents ):
236
236
index = index_with_documents ()
237
237
update = index .update_sortable_attributes (['release_date' ])
238
238
index .wait_for_pending_update (update ['updateId' ])
239
239
response = index .search (
240
- 'world ' ,
240
+ 'dark ' ,
241
241
{
242
242
'sort' : ['release_date:asc' ]
243
243
}
244
244
)
245
245
assert isinstance (response , dict )
246
- assert len (response ['hits' ]) == 12
246
+ assert len (response ['hits' ]) == 2
247
247
assert 'facetsDistribution' not in response
248
248
assert 'exhaustiveFacetsCount' not in response
249
- assert response ['hits' ][0 ]['title' ] == 'Avengers: Infinity War '
250
- assert response ['hits' ][1 ]['title' ] == 'Redcon-1 '
249
+ assert response ['hits' ][0 ]['title' ] == 'After '
250
+ assert response ['hits' ][1 ]['title' ] == 'Dumbo '
251
251
252
252
def test_custom_search_params_with_multiple_sort (index_with_documents ):
253
253
index = index_with_documents ()
254
254
update = index .update_sortable_attributes (['title' , 'release_date' ])
255
255
index .wait_for_pending_update (update ['updateId' ])
256
256
response = index .search (
257
- 'world ' ,
257
+ 'dark ' ,
258
258
{
259
259
'sort' : ['title:asc' , 'release_date:asc' ]
260
260
}
261
261
)
262
262
assert isinstance (response , dict )
263
- assert len (response ['hits' ]) == 12
263
+ assert len (response ['hits' ]) == 2
264
264
assert 'facetsDistribution' not in response
265
265
assert 'exhaustiveFacetsCount' not in response
266
- assert response ['hits' ][0 ]['title' ] == 'Alita: Battle Angel '
267
- assert response ['hits' ][1 ]['title' ] == 'Aquaman '
266
+ assert response ['hits' ][0 ]['title' ] == 'After '
267
+ assert response ['hits' ][1 ]['title' ] == 'Dumbo '
268
268
269
269
def test_phrase_search (index_with_documents ):
270
270
response = index_with_documents ().search ('coco "dumbo"' )
0 commit comments