def test_long_score_modifier(self):
        """
        Test that adding to score works for a long score modifier.
        """
        test_cases = [self.structured_index_name, self.unstructured_index_name]

        for test_index_name in test_cases:
            with (self.subTest(test_index_name)):
                # Add document
                docs = [
                    {"_id": "1", "text_field": "a photo of a cat", "long_score_mods": 2 ** 34},
                    {"_id": "2", "text_field": "a photo of a cat", "long_score_mods": 2 ** 35},
                    {"_id": "3", "text_field": "a photo of a cat", "long_score_mods": 2 ** 36},
                    {"_id": "4", "text_field": "a photo of a cat"}
                ]
                tensor_fields = ["text_field"] if "unstr" in test_index_name else None
                res = self.client.index(test_index_name).add_documents(documents=docs, tensor_fields=tensor_fields)

                # Search
                # 0.5 + 2**36 * 2 = 2**37
                res = self.client.index(test_index_name).search(
                    q="",
                    score_modifiers={
                        "add_to_score": [{"field_name": "long_score_mods", "weight": 2}]
                    }
                )

                # Get the score of the first result and divide by 1**39
                score_of_first_result = res["hits"][0]["_score"] / 1 ** 39
                # Assert that the first result has _id "3" and 2**37-1 <= score <= 2**37+1
                self.assertEqual(res["hits"][0]["_id"], "3")
                self.assertTrue(2 ** 37 - 1 <= score_of_first_result <= 2 ** 37 + 1)

        Test that adding to score works for a long score modifier.
        
tests/api_tests/v1/tests/api_tests/test_dict_score_modifiers.py