I don't think you can. See Jörg answer: https://groups.google.com/d/msg/elasticsearch/SzF0LhiVvqk/htn52x3xgmoJ
That said, you can do something like:
curl -XGET http://localhost:9200/_search?source=YOUR_JSON_HERE
curl 'localhost:9200/_search?source={"query":{"term":{"user":"kimchy"}}}'
Does it help?
Le 31 janv. 2013 à 04:31, Alex Roytman roytmana@gmail.com a écrit :
I mean passing query in form-encoded parameters via POST as supposed to passing it in request body in raw
just like with get you can pass parameters via query string, with post you can pass then form-encoded. web server (say servlet API) then would extract them and present it to you as parameters
On Wed, Jan 30, 2013 at 10:27 PM, David Pilato david@pilato.fr wrote:
Sorry. I don't understand. What do you mean by POST?
This?
curl -XPOST 'http://localhost:9200/twitter/tweet/_search' -d '{
"query": {
"filtered" : {
"query" : {
"query_string" : {
"query" : "some query string here"
}
},
"filter" : {
"term" : { "user" : "kimchy" }
}
}
}
}
'
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 31 janv. 2013 à 04:06, AlexR roytmana@gmail.com a écrit :
I found a partial answer. one can pass complete query in GET source parameter. But the query I generate (with facet, facet filters + filtered (based on selected facet values) query can rather long. I would be more comfortable passing it as post parameter. I tried post with source parameter but unfortunately it does not work:
{"error":"SearchPhaseExecutionException[Failed to execute phase [query_fetch], total failure; shardFailures {[pguRRu2dTzKk_AMMcUO32w][award][0]: SearchParseException[[award][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [na]]]; nested: ElasticSearchParseException[Failed to derive xcontent from org.elasticsearch.common.bytes.ChannelBufferBytesReference@61f0ab21]; }]","status":500}
On Wednesday, January 30, 2013 9:43:43 PM UTC-5, AlexR wrote:
Hello,
For complete functionality, UI framework I use needs query be passed in POST parameters rather than body. Is there any way I can pass complete query I would normally pass in the body in POST parameter.
Using GET and URI is not an option - I need full query DSL
Thank you,
Alex
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.