All Projects → olivernn → Lunr.js

olivernn / Lunr.js

Licence: mit
A bit like Solr, but much smaller and not as bright

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Lunr.js

Riddle
Ruby Client API for Sphinx
Stars: ✭ 139 (-98.23%)
Mutual labels:  search, full-text-search
Scout
RESTful search server written in Python, powered by SQLite.
Stars: ✭ 213 (-97.29%)
Mutual labels:  search, full-text-search
So Simple Theme
A simple Jekyll theme for words and pictures.
Stars: ✭ 1,701 (-78.32%)
Mutual labels:  search, lunr
lunr-module
Full-text search with pre-build indexes for Nuxt.js using lunr.js
Stars: ✭ 45 (-99.43%)
Mutual labels:  lunr, full-text-search
Fess
Fess is very powerful and easily deployable Enterprise Search Server.
Stars: ✭ 561 (-92.85%)
Mutual labels:  search, full-text-search
Manticoresearch
Database for search
Stars: ✭ 610 (-92.23%)
Mutual labels:  search, full-text-search
Tntsearch
A fully featured full text search engine written in PHP
Stars: ✭ 2,693 (-65.68%)
Mutual labels:  search, full-text-search
gatsby-plugin-lunr
Gatsby plugin for full text search implementation based on lunr client-side index. Supports multilanguage search.
Stars: ✭ 69 (-99.12%)
Mutual labels:  lunr, full-text-search
rgpipe
lesspipe for ripgrep for common new filetypes using few dependencies
Stars: ✭ 21 (-99.73%)
Mutual labels:  search, full-text-search
Typesense
Fast, typo tolerant, fuzzy search engine for building delightful search experiences ⚡ 🔍 ✨ An Open Source alternative to Algolia and an Easier-to-Use alternative to ElasticSearch.
Stars: ✭ 8,644 (+10.17%)
Mutual labels:  search, full-text-search
Flexsearch
Next-Generation full text search library for Browser and Node.js
Stars: ✭ 8,108 (+3.34%)
Mutual labels:  search, full-text-search
Spimedb
EXPLORE & EDIT REALITY
Stars: ✭ 14 (-99.82%)
Mutual labels:  search
Moqui Elasticsearch
Moqui Tool Component for ElasticSearch useful for scalable faceted text search, and analytics and reporting using aggregations and other great features
Stars: ✭ 10 (-99.87%)
Mutual labels:  search
Better Search
Better Search WordPress plugin
Stars: ✭ 9 (-99.89%)
Mutual labels:  search
Walrus
Lightweight Python utilities for working with Redis
Stars: ✭ 846 (-89.22%)
Mutual labels:  full-text-search
Meme Glossary
Meme serving with NLP
Stars: ✭ 30 (-99.62%)
Mutual labels:  search
Opensse
Open Sketch Search Engine- 3D object retrieval based on sketch image as input
Stars: ✭ 883 (-88.75%)
Mutual labels:  search
Multisearchview
Yet another built-in animated search view for Android.
Stars: ✭ 837 (-89.33%)
Mutual labels:  search
Raftman
A syslog server with integrated full text search via a JSON API and Web UI
Stars: ✭ 26 (-99.67%)
Mutual labels:  full-text-search
Blast
Blast is a full text search and indexing server, written in Go, built on top of Bleve.
Stars: ✭ 934 (-88.1%)
Mutual labels:  search

Lunr.js

Join the chat at https://gitter.im/olivernn/lunr.js

Build Status

A bit like Solr, but much smaller and not as bright.

Example

A very simple search index can be created using the following:

var idx = lunr(function () {
  this.field('title')
  this.field('body')

  this.add({
    "title": "Twelfth-Night",
    "body": "If music be the food of love, play on: Give me excess of it…",
    "author": "William Shakespeare",
    "id": "1"
  })
})

Then searching is as simple as:

idx.search("love")

This returns a list of matching documents with a score of how closely they match the search query as well as any associated metadata about the match:

[
  {
    "ref": "1",
    "score": 0.3535533905932737,
    "matchData": {
      "metadata": {
        "love": {
          "body": {}
        }
      }
    }
  }
]

API documentation is available, as well as a full working example.

Description

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. It saves adding extra, compacted services on the server. A local search index will be quicker, there is no network overhead, and will remain available and usable even without a network connection.

Installation

Simply include the lunr.js source file in the page that you want to use it. Lunr.js is supported in all modern browsers.

Alternatively an npm package is also available npm install lunr.

Browsers that do not support ES5 will require a JavaScript shim for Lunr to work. You can either use Augment.js, ES5-Shim or any library that patches old browsers to provide an ES5 compatible JavaScript environment.

Features

  • Full text search support for 14 languages
  • Boost terms at query time or boost entire documents at index time
  • Scope searches to specific fields
  • Fuzzy term matching with wildcards or edit distance

Contributing

See the CONTRIBUTING.md file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].