import { SearchIndex } from 'search-index'
// initialize an index
const { PUT, QUERY } = new SearchIndex(options)
// add documents to the index
await PUT(documents)
// read documents from the index
const results = await QUERY(query)
Temporary fork of https://www.npmjs.com/package/search-index experimenting with lower RAM consumption
Homepage npm JavaScript Download
npm install cozy-fork-search-index@0.6.15
import { SearchIndex } from 'search-index'
// initialize an index
const { PUT, QUERY } = new SearchIndex(options)
// add documents to the index
await PUT(documents)
// read documents from the index
const results = await QUERY(query)