A demo site to show off some features of Lunr 2... ...or more than that coming!
Data of every IPFS/.eth site shall be indexed and made searchable by Lunr.
- Search term highlighting
- More advances query capabilities
- Improved searching performance
- Smaller index size
This is intended as a demo only for now, and the site itself is quite basic. The source should give some pointers in using Lunr 2, more comprehensive documentation and guides will be made available before the full release of Lunr 2.
This is based in the moonwalkers sample, made by the same creator of Lunr 2.
In Lunr 2 all search indexes are static and immutable. In this site the index is built ahead of time using the script in build-index
.
The basic search interface is largely unchanged from previous versions of Lunr, the details of searching can be seen in src/main.js
.
The index includes the positions of all terms, and this data is used by src/wrapper.js
to highlight search results.
First, to init/setup, run npm install
and sudo apt install rake
.
The build is automated using rake. To re-create the site run rake
from the project directory, every time you make a modification and want to deploy it.