Use to_hash instead of as_json for search_data