search both hash and public_hash values