Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fergiemcdowall committed Sep 30, 2014
1 parent f85d2a3 commit e5b91e1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Expand Up @@ -150,6 +150,28 @@ field must always be an array of single String tokens, for example
remember to wrap home-rolled JSON with 'JSON.parse' to turn it into an
object.

Example:
```javascript
var batch = {
'doc1':{
'title':'A really interesting document',
'body':'This is a really interesting document',
'metadata':['red', 'potato']
},
'doc2':{
'title':'Another interesting document',
'body':'This is another really interesting document that is a bit different',
'metadata':['yellow', 'potato']
}
};
var batchName = 'twoDocs';
var filters = ['metadata'];

si.add({'batchName': batchName, 'filters': filters}, data, function(err) {
if (!err) console.log('indexed!');
});
```


##si.del

Expand Down

0 comments on commit e5b91e1

Please sign in to comment.