PDF Search: the algorithm design manual