This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WEBVTT | |
00:00:00.500 --> 00:00:02.000 | |
The Web is always changing | |
00:00:02.500 --> 00:00:04.300 | |
and the way we access it is changing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"index": { | |
"title": { | |
"root": { | |
"9": { | |
"8": { | |
"docs": { | |
"98+Short+Sleeve+Tee": { | |
"tf": 1 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const matches = index.search(‘foo’); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.js running on the user's browser | |
fetch('data/index.json').then(response => { | |
return response.json(); | |
}).then(json => { | |
index = elasticlunr.Index.load(json); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node index.js | |
// get documents to be indexed. | |
const docs = getDocs(); | |
const index = elasticlunr(function() { | |
// Set fields to index. | |
this.addField('name'); | |
this.addField('description'); | |
// Set the field used to identify documents. | |
this.setRef('id'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"index": { | |
"title": { | |
"root": { | |
"9": { | |
"8": { | |
"docs": { | |
"98+Short+Sleeve+Tee": { | |
"tf": 1 | |
}, |