But the problem is on every key press on the query search bar, kibana is fetching data from elastic search. And this sometimes slows down my elastic search.
Is there any way in which I can catch the event of search event of kibana? I know the search button fires filterResults() function of kibana.
My Kibana version is 4.3.0
And on every key press in the search bar it sends an http get request to elasticsearch.
It should only send the request when the query is submitted.
Instead of watching the appState for changes (which is updated on every key press), you'll want to watch for save_with_changes events:
const state = getAppState();
$scope.$listen(state, 'save_with_changes', function (diff) {
if (diff.includes('query')) {
console.log(state.query);
}
});
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.