Static Sites with Sphinx and Markdown Transcripts
Chapter: More Authoring
Lecture: Serverless search

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Sphinx has long provided a bundled solution for server list search which kind of makes sense
0:07 Sphinx is a static site generator and there's not a search engine around and with
0:15 this people type in search terms.
0:17 So for example in our site I could go and type 'thought' hit enter and
0:26 even though it's just serving from files on desk,
0:28 I'm able to get search results and highlighting and stuff like that.
0:31 Well how does this work. At build time
0:35 Sphinx writes an inverted index to a search index.js file.
0:42 If I went to my build directory and went to html in this html directory,
0:49 I see that there's this file called searchindex.js and if I double click
0:53 on it it's a big pile of java script that is a data structure for this
0:59 inverted index. And when someone asked to find search results,
1:04 this data file is downloaded to the browser processed in the browser by a Sphinx javascript
1:11 library and the results are presented.
1:14 Now there are limits to this approach.
1:17 Very large sites will generate a very large index and take a long time to download
1:22 it and to process it and for these case many Sphinx sites use server side or
1:28 cloud based integration with read the docks.
1:32 For example you'll get access to elastic search based indexing.
1:37 Not only is it a lot better performance and the browser download,
1:42 but needless to say the search results are far better than you would get with this simple server list search.