Using elasticsearch with easy:search package

Noob here, trying to set up easy:search to use elasticsearch as its engine. How do I go about it? What I have so far doesn’t seem to work.

ArtistsIndex = new Index({
    collection: Artists,
    fields: ['name'],
    engine: new ElasticSearchEngine({
        query: function () {
           // what goes in here???

I believe I ought to configure a query as one of the options in the engine, but I can’t seem to get that part right.