diff --git a/tests/test_router.py b/tests/test_router.py index c210e7d7..b1d3399a 100644 --- a/tests/test_router.py +++ b/tests/test_router.py @@ -164,16 +164,16 @@ def test_doc_reduce_router(self): # shard1 only has d1 s = msg.response.search.topk_results.add() s.score = 0.1 - s.doc.meta_info = b'1' + s.doc.doc_id = 1 s.doc.raw_text = 'd1' s = msg.response.search.topk_results.add() s.score = 0.2 - s.doc.meta_info = b'2' + s.doc.doc_id = 2 s = msg.response.search.topk_results.add() s.score = 0.3 - s.doc.meta_info = b'3' + s.doc.doc_id = 3 msg.envelope.num_part.extend([1, 2]) c1.send_message(msg) @@ -183,16 +183,16 @@ def test_doc_reduce_router(self): # shard2 has d2 and d3 s = msg.response.search.topk_results.add() s.score = 0.1 - s.doc.meta_info = b'1' + s.doc.doc_id = 1 s = msg.response.search.topk_results.add() s.score = 0.2 - s.doc.meta_info = b'2' + s.doc.doc_id = 2 s.doc.raw_text = 'd2' s = msg.response.search.topk_results.add() s.score = 0.3 - s.doc.meta_info = b'3' + s.doc.doc_id = 3 s.doc.raw_text = 'd3' msg.response.search.top_k = 5 @@ -279,19 +279,19 @@ def test_doc_sum_reduce_router(self): s = msg.response.search.topk_results.add() s.score = 0.4 - s.doc.doc_id = 1 + s.doc.meta_info = b'1' s.doc.raw_text = 'd3' s.score_explained = '1-d3\n' s = msg.response.search.topk_results.add() s.score = 0.3 - s.doc.doc_id = 2 + s.doc.meta_info = b'2' s.doc.raw_text = 'd2' s.score_explained = '1-d2\n' s = msg.response.search.topk_results.add() s.score = 0.2 - s.doc.doc_id = 3 + s.doc.meta_info = b'3' s.doc.raw_text = 'd1' s.score_explained = '1-d3\n' @@ -302,19 +302,19 @@ def test_doc_sum_reduce_router(self): s = msg.response.search.topk_results.add() s.score = 0.5 - s.doc.doc_id = 1 + s.doc.meta_info = b'1' s.doc.raw_text = 'd2' s.score_explained = '2-d2\n' s = msg.response.search.topk_results.add() s.score = 0.2 - s.doc.doc_id = 2 + s.doc.meta_info = b'2' s.doc.raw_text = 'd1' s.score_explained = '2-d1\n' s = msg.response.search.topk_results.add() s.score = 0.1 - s.doc.doc_id = 3 + s.doc.meta_info = b'3' s.doc.raw_text = 'd3' s.score_explained = '2-d3\n'