Fix search

Update search code, change how to search.
Tested on Elasticsearch v1.4.1 and elasticsearch/elasticsearch v1.3.1.
Merge pull request #4 from kenjis/fix_search

Fix search