This plugin also exposes a generateTimelineQuery utility, that helps you create a complex query to get the data ordered by time and boosted by a given array of topics.
The first argument is the topics array, while the second is the Elasticsearch from parameter.