Add functions to get results from elastic
add caching pipelining