Surface-thriving bacteria are commonly found in environments that involve both shear flow and the presence of biological macromolecules. An illustrative example is airway mucus, which contains high concentrations of polymeric mucins and exhibits non-Newtonian rheology. However, the impact of polymer properties, particularly shear-thinning and fluid elasticity, on bacterial swimming behavior in flow environments remains unclear. To address this knowledge gap, our study focused on investigating the rheotaxis of E.