Currently, at least in Discover page, when you make a query while there is a current msearch going on, the msearch is only done for the very first query. Subsequent changes don't receive any msearch. This can be confirmed by tracking the msearch requests in your browser's development tools. I have posted a bug report about this in https://github.com/elastic/kibana/issues/15840.
I was tasked to modify (if this is the expected behaviour) or fix this. I've been looking around courier.js's fetch() function and I ended up looking at requestQueue in that gets populated when a Request object is initialized. More specifically SegmentedReq in SegmentedRequestProvider. I mentioned that since courier.fetch() fetches things that are in the requestQueue.
My problem now is when are requestQueue populated. discover.js's fetch() don't seem to do a thing in terms of populating the queue, it assumes that it is already populated by then. I also don't know who calls the callback returned by onBeginSegmentedFetch, which if called, populates the requestQueue.
Any help would be appreciated,