A node.js client for elasticsearch
Elsa is an elasticsearch client for node.js. It is still very incomplete but has enough functionality to index, remove, and search for documents.
var elsa = require'elsa';elsaconfigurl: 'localhost'port: 9200 // this is the defaultindex: 'index_name';var documents =name: 'Snoop Dogg' origin: 'Long Beach, CA'name: '50 Cent' origin: 'Queens, NY';// You can also pass a single document to index.// Documents currently are always bulk-indexed.elsaindex'rappers' documents// This callback is passed to request.;elsasearch'rappers' match: name: 'Nas'// result is the elasticsearch response converted to json.;var objId = 'idToRemove';elsaremove'rappers' objId// This callback is also passed to request.// You can omit the 2nd arg to remove the entire type.;