Hi,
I am using elasticsearch javascript api for searching data. Forming a search query after getting the search word from the input text
client.search({
index: 'my-index,
type: 'text-files',
body: {
query: {
match: {
"attachment.content": searchedWord
}
},
highlight : {
order : "score",
fields : {
"attachment.content" : {"fragment_size" : 1000}
}
}
}
}).then(function (resp) {
var hits = resp.hits.hits;
}, function (err) {
console.trace(err.message);
});
Request is proper json is also not having any problem but when it hits through my javascript application I dont get any results. When I looked into network tab in browser I observed that request type is POST. Is there any api thrpugh which I can change request type to GET. Thing is above request works fine in my kibana console with GET request.
Thanks in advance