start elasticsearch in a programming way