def test_track_total_hits_no_results(self):
        """Test track_total_hits when there are no matching documents"""
        res = self.client.index(self.unstructured_text_index_name).search(
            "nonexistentquery123456",
            search_method="HYBRID",
            hybrid_parameters={
                "retrievalMethod": "lexical",
                "rankingMethod": "lexical"
            },
            track_total_hits=True
        )
        self.assertIn("totalHits", res)
        self.assertEqual(res["totalHits"], 0)
        self.assertEqual(len(res["hits"]), 0)
Test track_total_hits when there are no matching documents
tests/api_tests/v1/tests/api_tests/unstructured_index/test_facets.py