const getData = function(err, myIndex) {
readStreamOfDocuments // <- a stream of documents to be indexed
.pipe(myIndex.defaultPipeline()) // <- an extentable document processing pipeline
.pipe(myIndex.add()) // <- myIndex is a search index that can now be queried
}
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
- 0.7.0 : new constructor
- 0.8.0 : new search API
- 0.9.0 : Streaming API