refactor: rename search test to search and update related components and APIs#976
Conversation
There was a problem hiding this comment.
Bug: Function Name Collision Causes Test Failures
A function name collision exists for assert_search_result_item in tests/e2e_test/utils.py. One definition is a nested function within assert_search_result (renamed from assert_search_test_result_item) that validates search item properties (score, content, rank). The other is a newly added module-level function that checks for recall_type existence. This conflict means any external calls to assert_search_result_item will resolve to the module-level function, potentially breaking existing test validation logic that relies on the original nested function's behavior.
tests/e2e_test/utils.py#L57-L90
ApeRAG/tests/e2e_test/utils.py
Lines 57 to 90 in a0af9a8
Bug: Migration Script Renames Tables, Fails Index Drops
The migration script introduces two issues:
- It includes an unrelated rename of the
document_indexestable todocument_index. - After renaming
searchtesthistorytosearchhistory, it attempts to drop indexes by their old names (e.g.,ix_searchtesthistory_collection_id) on the new table (searchhistory). This fails because indexes are automatically renamed or become invalid when their parent table is renamed.
aperag/migration/versions/20250623110658-23c0533b6b63.py#L21-L34
ApeRAG/aperag/migration/versions/20250623110658-23c0533b6b63.py
Lines 21 to 34 in a0af9a8
Was this report helpful? Give feedback by reacting with 👍 or 👎
No description provided.