use sql to query elasticsearch