What I want:
In Kibana, make a custom query in Javascript to produce a JSON response containing information like this:
"hits": {
"total": 8888229,
"max_score": null,
"hits": [
{
"_index": "logstash-2015.07.20",
"_type": "logs",
"_id": "AU6s1kvTAluRVDz068io",
"_score": null,
"_source": {
"message": "",
"@version": "1",
"@timestamp": "2015-07-20T19:00:01.595Z",
"type": "logs",
"file": "/home/karl/sys_info.log",
"host": "dood",
"offset": "0",
"tags": [
"_grokparsefailure"
]
}, //...etc...//
What I've tried:
- Sending POST requests using Javascript to /elasticsearch/_msearch?timeout=0&ignore_unavailable=true&preference=1437514278665 that look very much like the POST requests that are sent when you search in Kibana's query bar.
- Attempt to use the add() function which in my tacked on Javascript file I seem to have access to.
- Attempt to use require('components/courier/data_source/search_source') to get the SearchSource object. In doing this I wasn't able to figure out how to use Private and the other parameters to ***SearchSourceFactory()***.
Relevant links which I've viewed: https://github.com/elastic/kibana/issues/3580
###What should I do?