const si = require('search-index')
// initialize an index
const { PUT, QUERY } = await si()
// add documents to the index
await PUT( /* objects */ )
// read documents from the index
const results = await QUERY( /* query */ )
A text search index module for Node.js. Search-index allows applications to add, delete and retrieve documents from a corpus. Retrieved documents are ordered by tf-idf relevance, filtering on metadata, and field weighting
Homepage Repository npm JavaScript Download
npm install jh-search-index@0.5.2
const si = require('search-index')
// initialize an index
const { PUT, QUERY } = await si()
// add documents to the index
await PUT( /* objects */ )
// read documents from the index
const results = await QUERY( /* query */ )