async def aquery(
        self, query: VectorStoreQuery, **kwargs: Any
    ) -> VectorStoreQueryResult:
        """Asynchronous version of the query method."""
        if query.mode == VectorStoreQueryMode.DEFAULT:
            pass
        elif query.mode in [
            VectorStoreQueryMode.HYBRID,
            VectorStoreQueryMode.SPARSE,
            VectorStoreQueryMode.TEXT_SEARCH,
        ]:
            if self.enable_sparse is False:
                raise ValueError(
                    f"The query mode requires sparse embedding, but enable_sparse is False."
                )
        elif query.mode == VectorStoreQueryMode.MMR:
            pass
        else:
            raise ValueError(f"Milvus does not support {query.mode} yet.")

        string_expr, output_fields = self._prepare_before_search(query, **kwargs)

        # Perform the search
        if query.mode == VectorStoreQueryMode.MMR:
            nodes, similarities, ids = await self._async_mmr_search(
                query, string_expr, output_fields, **kwargs
            )
        elif query.mode in [
            VectorStoreQueryMode.SPARSE,
            VectorStoreQueryMode.TEXT_SEARCH,
        ]:
            nodes, similarities, ids = await self._async_sparse_search(
                query, string_expr, output_fields, **kwargs
            )
        elif query.mode == VectorStoreQueryMode.HYBRID:
            nodes, similarities, ids = await self._async_hybrid_search(
                query, string_expr, output_fields
            )
        else:
            nodes, similarities, ids = await self._async_default_search(
                query, string_expr, output_fields, **kwargs
            )
        return VectorStoreQueryResult(nodes=nodes, similarities=similarities, ids=ids)
Asynchronous version of the query method.
llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/base.py