Matching Heterogeneous Agents with a Linear Search Technology