So far I haven't found any samples of HOW the elastic.js client api (https://github.com/fullscale/elastic.js) can be used for indexing documents. There are some clues here & there but nothing concrete yet.
- http://docs.fullscale.co/elasticjs/ejs.Document.html
- Document ( index, type, id ): Object used to create, replace, update, and delete documents
- Document > doIndex(fnCallBack): Stores a document in the given index and type. If no id is set, one is created during indexing.
- Document > source (doc): Sets the source document.
Can anyone provide a sample snippet of code to show how an document object can be instantiated and used to index data?
Thanks!