We consider a model of on-the-job search where firms offer long-term wage contracts to workers of different ability. Firms do not observe worker ability upon hiring but learn it gradually over time. With sufficiently strong information frictions, low-wage firms offer separating contracts and hire all types of workers in equilibrium, whereas high-wage firms offer pooling contracts designed to retain high-ability workers only. Low-ability workers have higher turnover rates, they are more often employed in low-wage firms and face an earnings distribution with a higher frictional component. Furthermore, positive sorting obtains in equilibrium.