Improve searchByHash() to handle multiple hashes.