Search -d queries not working in browser


(Vipul) #1

When I run $ curl -X GET 'http://localhost:9200/sample/new/_search?pretty=true' -d '{ fields:["price_incl_tax","product_id"],query:{range:{price_incl_tax:{gte:1000,lte:1500}}} }' in the cygwin , it works and gives the right result. But when I open the link "http://localhost:9200/sample/new/_search?pretty=true -d ' { fields:["price_incl_tax","product_id"],query:{range:{price_incl_tax:{gte:1000,lte:1500}}} }'" in the browser, I am getting the wrong answer. I am getting 20(all) results whereas I should get only 2. What to do? Thanks in advance.


(system) #2