async def search(
        self,
        db: AsyncSession,
        query: str,
        readable_id: str,
        current_user: schemas.User,
    ) -> list[dict]:
        """Search across vector database using existing connections.

        Args:
            db (AsyncSession): Database session
            query (str): Search query text
            readable_id (str): Readable ID of the collection to search within
            current_user (schemas.User): Current user performing the search

        Returns:
            list[dict]: List of cleaned search results

        Raises:
            NotFoundException: If sync or connections not found
        """
        try:
            collection = await crud.collection.get_by_readable_id(db, readable_id, current_user)
            if not collection:
                raise NotFoundException("Collection not found")

            # Get the destination model
            destination_model = await crud.destination.get_by_short_name(db, "qdrant_native")
            if not destination_model:
                raise NotFoundException("Destination not found")

            # Initialize destination class
            destination_class = resource_locator.get_destination(destination_model)

            # Use OpenAI embeddings if API key is available
            if settings.OPENAI_API_KEY:
                logger.info(
                    "Using OpenAI embedding model for search in "
                    f"collection {readable_id} {collection.id}"
                )
                embedding_model = OpenAIText2Vec(api_key=settings.OPENAI_API_KEY)
            else:
                logger.info(
                    "Using local embedding model for search in "
                    f"collection {readable_id} {collection.id}"
                )
                embedding_model = LocalText2Vec()

            vector = await embedding_model.embed(query)
            destination = await destination_class.create(collection_id=collection.id)

            # Perform search
            results = await destination.search(vector)

            # Clean results before returning
            cleaned_results = self._clean_search_results(results, for_display=True)

            return cleaned_results

        except NotFoundException:
            # Re-raise NotFoundExceptions as-is
            raise
        except ConnectionError as e:
            logger.error(f"Vector database connection error: {str(e)}")
            raise ConnectionError(f"Unable to connect to vector database: {str(e)}") from e
        except Exception as e:
            logger.error(f"Search error: {str(e)}")
            # Add more context to the error
            if "connection" in str(e).lower():
                raise ConnectionError(f"Vector database connection failed: {str(e)}") from e
            raise
Search across vector database using existing connections.

        Args:
            db (AsyncSession): Database session
            query (str): Search query text
            readable_id (str): Readable ID of the collection to search within
            current_user (schemas.User): Current user performing the search

        Returns:
            list[dict]: List of cleaned search results

        Raises:
            NotFoundException: If sync or connections not found
        
backend/airweave/core/search_service.py