code: function init(config) {
      if (!engine)
        throw new Error(
          "No engine set for research. Set an engine using gitbook.research.setEngine(Engine)."
        );
  
      return engine.init(config).then(function() {
        initialized = true;
        gitbook.events.trigger("search.ready");
      });
    }
docs: Initialize search engine with config