docs/gitbook/gitbook-plugin-search/search-engine.js
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");
    });
  }
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");
    });
  }
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" ) ; } ) ; }
Initialize search engine with config
Initialize search engine with config