How can I use bulk api with ajax and json file

(Mustafa Ali Akca) #1


I want to use bulk api with ajax. I want to take data from a json file in server.

How can I take data from an json url ?

type: "POST",
async: false,
url: 'http://localhost:9200/test/_bulk',
data: data, // When I write a json file name it doesnt work example test.json
dataType: "json",
contentType: "application/text; charset=utf-8",
success: function(text) {

         error: function(err) {

thanks a lot

(system) #2