def test_track_total_hits_with_filter(self):
        """Test track_total_hits with filter returns correct count"""
        res = self.client.index(self.unstructured_text_index_name).search(
            "shirt",
            search_method="HYBRID",
            track_total_hits=True,
            filter_string="price:[100 TO 200]"
        )
        self.assertIn("totalHits", res)
        filtered_res = self.client.index(self.unstructured_text_index_name).search(
            "shirt",
            search_method="HYBRID",
            filter_string="price:[100 TO 200]"
        )
        self.assertEqual(res["totalHits"], len(filtered_res["hits"]))
Test track_total_hits with filter returns correct count
tests/api_tests/v1/tests/api_tests/unstructured_index/test_facets.py