[elasticsearch] adapt select() to use where