-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
-
Not Needed
-
Related to PYTHON-4208. the search index model "type" field should only be sent to the server if the user provides a value. Currently we send "type: search" by default which causes problems in the test suite:
[2024/04/03 04:35:13.639] FAILURE: AssertionError: Items in the second set but not the first: [2024/04/03 04:35:13.639] 'type' () [2024/04/03 04:35:13.639] self = <test.test_index_management.TestIndexManagementCreateSearchIndex testMethod=test_name_provided_for_an_index_definition> [2024/04/03 04:35:13.639] def test_case(self): [2024/04/03 04:35:13.639] > self.run_scenario(spec) [2024/04/03 04:35:13.639] test/unified_format.py:1909: [2024/04/03 04:35:13.639] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2024/04/03 04:35:13.639] test/unified_format.py:1856: in run_scenario [2024/04/03 04:35:13.639] self._run_scenario(spec, uri) [2024/04/03 04:35:13.639] test/unified_format.py:1892: in _run_scenario [2024/04/03 04:35:13.639] self.check_events(expect_events) [2024/04/03 04:35:13.639] test/unified_format.py:1764: in check_events [2024/04/03 04:35:13.639] self.match_evaluator.match_event(event_type, expected_event, actual_events[idx]) [2024/04/03 04:35:13.639] test/unified_format.py:865: in match_event [2024/04/03 04:35:13.639] self.match_result(command, actual.command) [2024/04/03 04:35:13.639] test/unified_format.py:792: in match_result [2024/04/03 04:35:13.639] return self._match_document(expectation, actual, is_root=not in_recursive_call) [2024/04/03 04:35:13.639] test/unified_format.py:781: in _match_document [2024/04/03 04:35:13.639] self.match_result(value, actual[key], in_recursive_call=True) [2024/04/03 04:35:13.639] test/unified_format.py:798: in match_result [2024/04/03 04:35:13.639] self._match_document(e, a, is_root=not in_recursive_call) [2024/04/03 04:35:13.639] test/unified_format.py:788: in _match_document [2024/04/03 04:35:13.639] self.test.assertEqual(expected_keys, set(actual.keys())) [2024/04/03 04:35:13.639] E AssertionError: Items in the second set but not the first: [2024/04/03 04:35:13.639] E 'type'
It's also inconsistent with other operations like collation, bypasDocumentValidation, and IndexModel where we only send a field if the user explicitly provides it.
- is duplicated by
-
PYTHON-4331 TestIndexManagementCreateSearchIndexes failing due to missing type
- Closed
- related to
-
PYTHON-4208 [Vector Search GA] Add support for the new type field when creating search indexes
- Closed