
Lunr: A bit like Solr, but much smaller and not as bright
Designed to be small, yet full featured, Lunr enables you to provide a great search experience without the need for external, server-side, search services. Extensible. Add powerful language processors to give more accurate results to user queries, or tweak the built-in processors to better fit your content. Everywhere
Getting Started : Lunr
This guide will walk you through setting up your first search index with Lunr. It assumes you have some familiarity with JavaScript. After finishing this guide you will have a script that will be able to perform a search on a collection of documents.
Searching - Lunr
Lunr supports fuzzy matching search terms in documents, which can be helpful if the spelling of a term is unclear, or to increase the number of search results that are returned. The amount of fuzziness to allow when searching can also be controlled.
JSDoc: Home - Lunr.js
Aug 19, 2020 · Lunr.js is a small, full-text search library for use in the browser. It indexes JSON documents and provides a simple search interface for retrieving documents that best match text queries. Why. For web applications with all their data already sitting in the client, it makes sense to be able to search that data on the client too.
Core Concepts - Lunr
Creating a basic search index with Lunr is simple. Understanding some of the concepts and terminology that Lunr uses will allow you to provide powerful search functionality. Documents. A document contains the text that you want to be able to search.
JSDoc: Namespace: lunr
Aug 19, 2020 · lunr.trimmer is a pipeline function for trimming non word characters from the beginning and end of tokens before they enter the index. This implementation may not work correctly for non latin characters and should either be removed or adapted for use with languages with non-latin characters.
Pre-building Indexes - Lunr
A better way is to pre-build the index, and serve a serialised index that Lunr can load on the client side much quicker. This technique is useful with large indexes, or with documents that are largely static, such as with a static website.
Upgrading - Lunr
The 2.x versions of Lunr have a similar interface to previous versions and therefore upgrading shouldn’t require large changes in how searches are performed. There are differences in how indexes are built and serialised, and the interface required of pipeline functions. This guide will cover the major differences and show how to upgrade.
Language Support - Lunr
Lunr has full support for the indexing and searching of documents in English. If your documents are in another language, you need to install the Lunr Languages plugin to get the best search results. Currently the following languages are supported: German; Danish; Spanish; Finnish; French; Hungarian; Italian; Japanese; Dutch
JSDoc: Class: Builder
lunr.Builder performs indexing on a set of documents and returns instances of lunr.Index ready for querying. All configuration of the index is done via the builder, the fields to index, the document reference, the text processing pipeline and document scoring parameters are all set on the builder before indexing.