def test_get_total_hits(self):
        """Test getting total hits for different retrieval methods"""
        self.add_fashion_docs()
        for retrieval_method, ranking_method in (
                (RetrievalMethod.Tensor, RankingMethod.Tensor),
                (RetrievalMethod.Lexical, RankingMethod.Lexical),
                (RetrievalMethod.Disjunction, RankingMethod.RRF),
        ):
            with self.subTest(retrieval_method=retrieval_method, ranking_method=ranking_method):
                res = tensor_search.search(
                    config=self.config, index_name=self.semi_structured_default_text_index.name, text="shirt",
                    search_method=SearchMethod.HYBRID, hybrid_parameters=HybridParameters(
                        retrievalMethod=retrieval_method, rankingMethod=ranking_method
                    ),
                    track_total_hits=True
                )
                if retrieval_method == RetrievalMethod.Lexical:
                    self.assertEqual(res["totalHits"], 1)
                else:
                    self.assertEqual(res["totalHits"], 4)
Test getting total hits for different retrieval methods
tests/integ_tests/tensor_search/integ_tests/test_facets.py