extracting a class for the actual inserting of data into elastic search