def test_nonexistent_score_modifier(self):
        """Test behavior when a specified score modifier doesn't exist in the document"""
        for index_name in [self.structured_index_name, self.unstructured_index_name]:
            with self.subTest(index_name=index_name):
                docs = [
                    {"_id": "1", "text_field": "test", "double_score_mods": 2.0},
                    {"_id": "2", "text_field": "test", "map_score_mods": {"a": 1.5}},
                ]
                tensor_fields = ["text_field"] if "unstr" in index_name else None
                self.client.index(index_name).add_documents(documents=docs, tensor_fields=tensor_fields)
                
                try:
                    res = self.client.index(index_name).search(
                        q="",
                        score_modifiers={
                            "multiply_score_by": [{"field_name": "nonexistent_field", "weight": 2}]
                        }
                    )
                except MarqoWebError as e:
                    print(f"Caught MarqoWebError: {e}")
                    self.assertIn('has no score modifier field nonexistent_field', str(e))
                except Exception as e:
                    print(f"Unexpected exception: {e}")
                    raise
Test behavior when a specified score modifier doesn't exist in the document
tests/api_tests/v1/tests/api_tests/test_dict_score_modifiers.py