Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search_template does not support ?source= #5556

Closed
clintongormley opened this issue Mar 26, 2014 · 1 comment · Fixed by #5598
Closed

search_template does not support ?source= #5556

clintongormley opened this issue Mar 26, 2014 · 1 comment · Fixed by #5598

Comments

@clintongormley
Copy link

All GET-with-body endpoints should support passing the body as the source parameter in the query string. search_template does not currently support this

@clintongormley
Copy link
Author

Fails with:

[2014-03-28 16:18:29,962][DEBUG][action.search.type       ] [Ape-Man] [test][4], node[FKDjNLD9RFq2-Mm6CgTADw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@52514fbf] lastShard [true]
org.elasticsearch.transport.RemoteTransportException: [Ecstasy][inet[/192.168.5.102:9301]][search/phase/query]
Caused by: org.elasticsearch.search.SearchParseException: [test][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"params":{"template":"all"},"template":{"query":{"match_{{template}}":{}}}}]]
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:634)
    at org.elasticsearch.search.SearchService.createContext(SearchService.java:507)
    at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:480)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:252)
    at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:623)
    at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:612)
    at org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:270)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
Caused by: org.elasticsearch.search.SearchParseException: [test][4]: from[-1],size[-1]: Parse Failure [No parser for element [params]]
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:620)
    ... 9 more

spinscale added a commit that referenced this issue Mar 31, 2014
If a search template was created using the source parameter, the
content of the parameter was put as source instead of sourceTemplate

Fixes #5556
spinscale added a commit that referenced this issue Mar 31, 2014
If a search template was created using the source parameter, the
content of the parameter was put as source instead of sourceTemplate

Fixes #5556
javanna added a commit that referenced this issue Mar 31, 2014
…hod through REST tests

For around 10% of the calls that support the GET method, the request body gets now sent as `source` parameter with GET method (no randomized method in this case).

This way we can find bugs like #5556 (missing support for source param).
javanna added a commit that referenced this issue Mar 31, 2014
…hod through REST tests

For around 10% of the calls that support the GET method, the request body gets now sent as `source` parameter with GET method (no randomized method in this case).

This way we can find bugs like #5556 (missing support for source param).
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
If a search template was created using the source parameter, the
content of the parameter was put as source instead of sourceTemplate

Fixes elastic#5556
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants