Hello,
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 ?
$.ajax({
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