search: make it possible to select/deselect threads

This will help us later to implement multi-thread action
remove the spec that fprintf(stderr...)