Key features of Elasticlunr.js
masterElasticlunr.js is a lightweight alternative to Lunr.js designed for browser and offline search. Key advantages include:
- Query-Time Boosting: Adjust field weights during the search process rather than at index time.
- Improved Performance: Faster computation by removing the need to compute document and query vectors (unlike Lunr.js).
- Smaller Index Size: Does not store a
TokenCorpus, resulting in index files approximately half the size of Lunr.js. Users can further reduce size by disabling original document storage. - Advanced Scoring: Uses a scoring mechanism similar to Elasticsearch/Lucene, combining Boolean, TF/IDF, and Vector Space models for reliable ranking.
- Field Search: Granular control over which fields are indexed and searched.