def test_different_retrieval_and_ranking_combinations_with_weighted_queries(self):
        """
        Tests that different search and retrieval combinations can be made with weighted queries.
        """

        # 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
                    )
                )

                base_parameters = {
                    "config": self.config,
                    "index_name": index.name,
                    "search_method": "HYBRID",
                    "text": None,
                }

                with self.subTest("Lexical retrieval, Tensor ranking - opposite weights should provide opposite results"):
                    res = tensor_search.search(
                        **base_parameters,
                        hybrid_parameters=HybridParameters(
                            queryTensor={
                                "dogs": 1.0,
                            },
                            queryLexical="dogs",
                            retrievalMethod=RetrievalMethod.Lexical,
                            rankingMethod=RankingMethod.Tensor
                        ),
                        result_count=10
                    )

                    reverse_res = tensor_search.search(
                        **base_parameters,
                        hybrid_parameters=HybridParameters(
                            queryTensor={
                                "dogs": -1.0,
                            },
                            queryLexical="dogs",
                            retrievalMethod=RetrievalMethod.Lexical,
                            rankingMethod=RankingMethod.Tensor
                        ),
                        result_count=5
                    )

                    # Check that top result is lowest in reverse weighted query
                    assert res["hits"][0]["_id"] == reverse_res["hits"][-1]["_id"]

                with self.subTest("tensor retrieval, lexical ranking - opposite weights result should not be included"):
                    res = tensor_search.search(
                        **base_parameters,
                        hybrid_parameters=HybridParameters(
                            queryTensor={
                                "dogs": 1.0,
                            },
                            queryLexical="dogs",
                            retrievalMethod=RetrievalMethod.Tensor,
                            rankingMethod=RankingMethod.Lexical
                        ),
                        result_count=10
                    )

                    reverse_res = tensor_search.search(
                        **base_parameters,
                        hybrid_parameters=HybridParameters(
                            queryTensor={
                                "dogs": -1.0,
                            },
                            queryLexical="dogs",
                            retrievalMethod=RetrievalMethod.Tensor,
                            rankingMethod=RankingMethod.Lexical
                        ),
                        result_count=5
                    )

                    # Check that top result is lowest in reverse weighted query
                    assert not any(r["_id"] for r in reverse_res["hits"] if r["_id"] == res["hits"][0]["_id"])

                with self.subTest("tensor retrieval, tensor ranking - opposite weights result should not be included"):
                    res = tensor_search.search(
                        **base_parameters,
                        hybrid_parameters=HybridParameters(
                            queryTensor={
                                "dogs": 1.0,
                            },
                            queryLexical=None,
                            retrievalMethod=RetrievalMethod.Tensor,
                            rankingMethod=RankingMethod.Tensor
                        ),
                        result_count=10
                    )

                    reverse_res = tensor_search.search(
                        **base_parameters,
                        hybrid_parameters=HybridParameters(
                            queryTensor={
                                "dogs": -1.0,
                            },
                            queryLexical=None,
                            retrievalMethod=RetrievalMethod.Tensor,
                            rankingMethod=RankingMethod.Tensor
                        ),
                        result_count=5
                    )

                    # Check that top result is lowest in reverse weighted query
                    assert not any(r["_id"] for r in reverse_res["hits"] if r["_id"] == res["hits"][0]["_id"])

                with self.subTest("disjunction retrieval, RRF ranking - opposite weights should provide opposite results"):
                    res = tensor_search.search(
                        **base_parameters,
                        hybrid_parameters=HybridParameters(
                            queryTensor={
                                "dogs": 1.0,
                            },
                            queryLexical="dogs",
                            retrievalMethod=RetrievalMethod.Disjunction,
                            rankingMethod=RankingMethod.RRF
                        ),
                        result_count=10
                    )

                    reverse_res = tensor_search.search(
                        **base_parameters,
                        hybrid_parameters=HybridParameters(
                            queryTensor={
                                "dogs": -1.0,
                            },
                            queryLexical="dogs",
                            retrievalMethod=RetrievalMethod.Disjunction,
                            rankingMethod=RankingMethod.RRF
                        ),
                        result_count=5
                    )

                    # Check that top result is lowest in reverse weighted query
                    assert res["hits"][0]["_id"] == reverse_res["hits"][-1]["_id"]

        Tests that different search and retrieval combinations can be made with weighted queries.
        
tests/integ_tests/tensor_search/integ_tests/test_hybrid_search.py