MaineC/elasticsearch-query-templates — pull request #1 by dadoonet (2014-01-08 12:29:18+00:00)
Title: Some changes :-)

Here are some changes.

I did not squash the commits as you can see all change one by one.

Hope this helps!

When running test, error I get now is:

```
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query], all shards failed; shardFailures {[hpJxklPhSO-fbhOQZZ-nLw][test][4]: SearchParseException[[test][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"template":{"template_string":"{\"match_{{template}}\": {}}\"","template_vars":{"template":"beck"}}}}]]]; nested: QueryParsingException[[test] No query registered for [match_beck]]; }{[hpJxklPhSO-fbhOQZZ-nLw][test][3]: SearchParseException[[test][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"template":{"template_string":"{\"match_{{template}}\": {}}\"","template_vars":{"template":"beck"}}}}]]]; nested: QueryParsingException[[test] No query registered for [match_beck]]; }{[hpJxklPhSO-fbhOQZZ-nLw][test][2]: SearchParseException[[test][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"template":{"template_string":"{\"match_{{template}}\": {}}\"","template_vars":{"template":"beck"}}}}]]]; nested: QueryParsingException[[test] No query registered for [match_beck]]; }{[hpJxklPhSO-fbhOQZZ-nLw][test][0]: SearchParseException[[test][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"template":{"template_string":"{\"match_{{template}}\": {}}\"","template_vars":{"template":"beck"}}}}]]]; nested: QueryParsingException[[test] No query registered for [match_beck]]; }{[hpJxklPhSO-fbhOQZZ-nLw][test][1]: SearchParseException[[test][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"template":{"template_string":"{\"match_{{template}}\": {}}\"","template_vars":{"template":"beck"}}}}]]]; nested: QueryParsingException[[test] No query registered for [match_beck]]; }
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:272)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$3.onFailure(TransportSearchTypeAction.java:224)
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:205)
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:216)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:203)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
```

Good luck!