const getData = function(err, myIndex) {
readStreamOfDocuments // <- a stream of documents to be indexed
.pipe(myIndex.feed()) // <- an extendable document processing pipeline (do objectMode: true for a stream of objects)
}
require('search-index')(options, getData) // <- make a new index
search-index
is a freetext search library for JavaScript. You can use it to drop fantabulous search functionality into your javascript applications
Find out how to use the search-index
module here:
- Create an index
- Add documents
- Search documents
- Aggregate documents (buckets and categories)
- Set up autocomplete and query suggestions
- Sync an index
- Run search-index in the browser
- Sync from a server to a browser
- Work with Gulp.js
- See releases page on GitHub