def test_weighted_tensor_query(self):
        """
        Tests that a weighted tensor query can be made.
        """

        # Add documents
        for index in [self.structured_text_index_score_modifiers, self.semi_structured_default_text_index]:
            with self.subTest(index=index.type):
                # Adding documents
                self.add_documents(
                    config=self.config, add_docs_params=AddDocsParams(
                        index_name=index.name, docs=self.docs_list,
                        tensor_fields=["text_field_1"] if isinstance(index, UnstructuredMarqoIndex) else None
                    )
                )

                # Reference results
                tensor_queries_list = [
                    # tensor query with 1 field
                    [{"dogs": 1.0}, {"dogs": -1}],
                    # tensor query with 3 fields
                    [{"dogs": 1.0, "cats": 0.5, "birds": 0.25}, {"dogs": -1, "cats": -0.5, "birds": -0.25}],
                ]
                for tensor_query in tensor_queries_list:
                    with self.subTest(tensor_query=tensor_query):
                        # Results with normal weights
                        tensor_res = tensor_search.search(
                            config=self.config,
                            index_name=self.structured_text_index_score_modifiers.name,
                            search_method="HYBRID",
                            text=None,
                            hybrid_parameters=HybridParameters(
                                queryTensor=tensor_query[0],
                                retrievalMethod=RetrievalMethod.Tensor,
                                rankingMethod=RankingMethod.Tensor
                            ),
                            result_count=10
                            )

                        # Results with reverse weights
                        tensor_res_reverse = tensor_search.search(
                            config=self.config,
                            index_name=self.structured_text_index_score_modifiers.name,
                            search_method="HYBRID",
                            text=None,
                            hybrid_parameters=HybridParameters(
                                queryTensor=tensor_query[1],
                                retrievalMethod=RetrievalMethod.Tensor,
                                rankingMethod=RankingMethod.Tensor
                            ),
                            result_count=5
                        )

                        # Check that top result is not present in reverse weighted query
                        top_hit = tensor_res["hits"][0]
                        self.assertIsNone(
                            next((doc for doc in tensor_res_reverse["hits"] if doc["_id"] == top_hit["_id"]), None)
                        )

        Tests that a weighted tensor query can be made.
        
tests/integ_tests/tensor_search/integ_tests/test_hybrid_search.py