Skip to content

Commit d0f4a5a

Browse files
committed
Fix test for more relevancy on sort
1 parent 85c0703 commit d0f4a5a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

meilisearch/tests/index/test_index_search_meilisearch.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,15 @@ def test_custom_search_params_with_many_params(index_with_documents):
217217

218218
def test_custom_search_params_with_sort_string(index_with_documents):
219219
index = index_with_documents()
220+
response = index.update_ranking_rules([
221+
'words',
222+
'typo',
223+
'sort',
224+
'proximity',
225+
'attribute',
226+
'exactness'
227+
])
228+
index.wait_for_pending_update(response['updateId'])
220229
update = index.update_sortable_attributes(['title'])
221230
index.wait_for_pending_update(update['updateId'])
222231
response = index.search(
@@ -234,6 +243,15 @@ def test_custom_search_params_with_sort_string(index_with_documents):
234243

235244
def test_custom_search_params_with_sort_int(index_with_documents):
236245
index = index_with_documents()
246+
response = index.update_ranking_rules([
247+
'words',
248+
'typo',
249+
'sort',
250+
'proximity',
251+
'attribute',
252+
'exactness'
253+
])
254+
index.wait_for_pending_update(response['updateId'])
237255
update = index.update_sortable_attributes(['release_date'])
238256
index.wait_for_pending_update(update['updateId'])
239257
response = index.search(
@@ -251,6 +269,15 @@ def test_custom_search_params_with_sort_int(index_with_documents):
251269

252270
def test_custom_search_params_with_multiple_sort(index_with_documents):
253271
index = index_with_documents()
272+
response = index.update_ranking_rules([
273+
'words',
274+
'typo',
275+
'sort',
276+
'proximity',
277+
'attribute',
278+
'exactness'
279+
])
280+
index.wait_for_pending_update(response['updateId'])
254281
update = index.update_sortable_attributes(['title', 'release_date'])
255282
index.wait_for_pending_update(update['updateId'])
256283
response = index.search(

0 commit comments

Comments
 (0)