Added a generic api for searching using an attribute or the entity id.