def test_get_total_hits_no_matches(self):
        """Test getting total hits when there are no matching documents"""
        self.add_fashion_docs()
        for retrieval_method, ranking_method in (
                (RetrievalMethod.Lexical, RankingMethod.Lexical),
        ):
            res = tensor_search.search(
                config=self.config, index_name=self.semi_structured_default_text_index.name, text="nonexistent",
                search_method=SearchMethod.HYBRID, hybrid_parameters=HybridParameters(
                    retrievalMethod=retrieval_method, rankingMethod=ranking_method
                ),
                track_total_hits=True
            )
            self.assertEqual(res["totalHits"], 0)
            self.assertEqual(len(res["hits"]), 0)
Test getting total hits when there are no matching documents
tests/integ_tests/tensor_search/integ_tests/test_facets.py