def prepare(self):
        """
        Prepare the indexes and add documents for the test.
        Also store the search results for later comparison.
        """
        self.logger.debug(f"Creating indexes {self.indexes_to_test_on}")
        self.create_indexes(self.indexes_to_test_on)
        add_docs_errors = []  # Collect add_docs_errors to report them at the end

        self.logger.debug(f'Feeding documents to {self.indexes_to_test_on}')
        for index in self.indexes_to_test_on:
            try:
                if index.get("type") is not None and index.get('type') == 'structured':
                    self.client.index(index_name=index['indexName']).add_documents(documents=self.docs)
                else:
                    self.client.index(index_name=index['indexName']).add_documents(documents=self.docs,
                                                                               mappings=self.mappings,
                                                                               tensor_fields=self.tensor_fields)
            except Exception as e:
                add_docs_errors.append((index, traceback.format_exc()))

        all_results = {}
        search_errors = []
        # Loop through queries, search methods, and result keys to populate unstructured_results
        for index in self.indexes_to_test_on:
            index_name = index['indexName']
            all_results[index_name] = {}

            # For each index, store results for different search methods
            for query, search_method, result_key in zip(self.queries, self.search_methods, self.result_keys):
                try:
                    if index.get("type") is not None and index.get("type") == 'structured':
                        if search_method == 'HYBRID':
                            result = self.client.index(index_name).search(q=query, search_method=search_method, hybrid_parameters=self.hybrid_search_params)
                        else:
                            result = self.client.index(index_name).search(q=query, search_method=search_method, searchable_attributes=self.searchable_attributes[search_method])
                    else:
                        result = self.client.index(index_name).search(q=query, search_method=search_method)
                    all_results[index_name][result_key] = result
                except Exception as e:
                    search_errors.append((query, search_method, index_name, traceback.format_exc()))
        if add_docs_errors:
            failure_message = "\n".join([
                f"Failure in index {idx}, {error}"
                for idx, error in add_docs_errors
            ])
            self.logger.error(f"Failed to add documents to index: {failure_message}. When the corresponding test runs for this index, it is expected to fail")
        if search_errors:
            failure_message = "\n".join([
                f"Failure in query {query}, search_method {search_method}, idx: {idx} : {error}"
                for query, search_method, idx, error in search_errors
            ])
            self.logger.error(f"Some subtests failed:\n{failure_message}. When the corresponding test runs for this index, it is expected to fail")
        self.save_results_to_file(all_results)



        # store the result of search across all structured & unstructured indexes

        Prepare the indexes and add documents for the test.
        Also store the search results for later comparison.
        
tests/compatibility_tests/search/structured/test_hybrid_search_structured.py