We consider a two-sided, finite-horizon search and matching model with heterogeneous types and complementarity between types. The quality of the pool of potential partners deteriorates as agents who have found mutually agreeable matches exit the market. When search is costless and all agents participate in each matching round, the market performs a sorting function in that high types of agents have multiple chances to match with their peers. However, this sorting function is lost if agents incur an arbitrarily small cost in order to participate in each round. With a sufficiently rich type space, the market unravels as almost all agents rush to participate in the first round and match and exit with anyone they meet