Query to a JSON file

I'm attempting to write ajax code in a PHP file that queries elasticsearch
server and returns a JSON document:

var load_data = function() {
$.ajax({ url: 'http://localhost:9200/inventory/_search?pretty=true'
, type: 'POST'
, data :
???????????????????
"query":{"match_all":{}}
})

I'm not sure what I need to type before my query to return a JSON document.
Could someone lend a hand? :slight_smile:

--
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.