Skip to content

Commit

Permalink
feat(API): feed method
Browse files Browse the repository at this point in the history
a cleaner, more concise way to add docs to the index
  • Loading branch information
fergiemcdowall committed Jun 24, 2017
1 parent 3dd796b commit 7929477
Show file tree
Hide file tree
Showing 33 changed files with 1,048 additions and 291 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

```javascript
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
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
```
Expand Down
Loading

0 comments on commit 7929477

Please sign in to comment.