Fix search

Update search code, change how to search.
Tested on Elasticsearch v1.4.1 and elasticsearch/elasticsearch v1.3.1.