Adding Id field to searchresult and helper function to create id field