Let \(({\mathcal {X}},d,\mu )\) be a doubling metric measure space in the sense of R. R. Coifman and G. Weiss, L be a one-to-one operator on \(L^2({\mathcal {X}})\) of type \(\omega \) having a bounded \(H_\infty \) functional calculus and satisfying the k-Davies–Gaffney estimate with \(k\in {\mathbb {N}},\) and X be a ball quasi-Banach function space on \({\mathcal {X}}\) . In this article, by using the Lusin area function associated with L, we introduce the weak Hardy type space \(WH_{X,L}\) related to X on \({\mathcal {X}}\) and establish its molecular and atomic characterizations. Applying the molecular characterization of \(WH_{X,L}\) when \({\mathcal {X}}:={\mathbb {R}}^n\) , we further show that the Riesz transform \(\nabla ^kL^{-\frac{1}{2}}\) is bounded from \(WH_{X,L}({\mathbb {R}}^n)\) to the weak Hardy space \(WH_X({\mathbb {R}}^n),\) when L is a homogeneous divergence form 2k-order elliptic operator \(L_1\) or a 2k-order Schrödinger type operator \(L_2\) on \({\mathbb {R}}^n\) . At the endpoint case, we also prove that \(\nabla ^kL^{-\frac{1}{2}}\) is bounded from the Hardy space \(H_{X,L}({\mathbb {R}}^n)\) to \(WH_X({\mathbb {R}}^n)\) . Moreover, the Riesz transform characterization of \(WH_{X,L_1}({\mathbb {R}}^n)\) is obtained. These results have a wide range of generality and are applied to specific function spaces including weak (weighted) Hardy spaces, weak Orlicz–Hardy spaces, and weak variable Hardy spaces.