def test_array_facets(self):
        """
        Tests array field faceting by comparing results between individual field facets
        and combined array facets containing the same information.
        """
        docs_for_test = copy.deepcopy(EXAMPLE_FASHION_DOCUMENTS)
        for doc_for_test in docs_for_test:
            doc_for_test["tags"] = [
                f"color:{doc_for_test['color']}",
                f"brand:{doc_for_test['brand']}",
                f"style:{doc_for_test['style']}",
            ]

        self.add_fashion_docs(docs_for_test)
        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):
                # Test regular facets and facets from array are the same
                facet_requests = [
                    FacetsParameters(fields={
                        "color": FieldFacetsConfiguration(type="string"),
                        "brand": FieldFacetsConfiguration(type="string"),
                        "style": FieldFacetsConfiguration(type="string"),
                    }),
                    FacetsParameters(fields={"tags": FieldFacetsConfiguration(type="array")}),
                ]
                res_string_facets = tensor_search.search(
                    config=self.config, index_name=self.semi_structured_default_text_index.name, text="shirt",
                    facets=facet_requests[0],
                    search_method=SearchMethod.HYBRID, hybrid_parameters=HybridParameters(
                        retrievalMethod=retrieval_method, rankingMethod=ranking_method
                    )
                )
                res_array_facets = tensor_search.search(
                    config=self.config, index_name=self.semi_structured_default_text_index.name, text="shirt",
                    facets=facet_requests[1],
                    search_method=SearchMethod.HYBRID, hybrid_parameters=HybridParameters(
                        retrievalMethod=retrieval_method, rankingMethod=ranking_method
                    )
                )
                self.assertNotEqual(res_array_facets, {})
                for facet, value in res_array_facets["facets"]["tags"].items():
                    splitted_name = facet.split(":")
                    self.assertDictEqual(res_string_facets["facets"][splitted_name[0]][splitted_name[1]], value)

        Tests array field faceting by comparing results between individual field facets
        and combined array facets containing the same information.
        
tests/integ_tests/tensor_search/integ_tests/test_facets.py