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

Comments

Projects
None yet
2 participants
@clintongormley
Copy link
Member

commented Mar 26, 2014

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

This comment has been minimized.

Copy link
Member Author

commented Mar 28, 2014

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 spinscale closed this in fdcc843 Mar 31, 2014

spinscale added a commit that referenced this issue Mar 31, 2014

Search template: Fix support for source parameter
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

Search template: Fix support for source parameter
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 spinscale added bug labels Mar 31, 2014

javanna added a commit that referenced this issue Mar 31, 2014

[TEST] Test sending the request body as source parameter with GET met…
…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

[TEST] Test sending the request body as source parameter with GET met…
…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

Search template: Fix support for source parameter
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
You can’t perform that action at this time.