Skip to content

Instantly share code, notes, and snippets.

@samdutton
Created February 2, 2018 00:38
Show Gist options
  • Save samdutton/d6e8748fb9d36926b15b78b0b203f409 to your computer and use it in GitHub Desktop.
Save samdutton/d6e8748fb9d36926b15b78b0b203f409 to your computer and use it in GitHub Desktop.
Get Elasticlunr index file
// main.js running on the user's browser
fetch('data/index.json').then(response => {
return response.json();
}).then(json => {
index = elasticlunr.Index.load(json);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment