{"dist":{"shasum":"fec3a5e5ca7ebc05536e6fba45a1cd69605a7144","tarball":"https://registry.npmjs.org/elasticsearchclient/-/elasticsearchclient-0.2.2.tgz","integrity":"sha512-HbvEzoUxTJfJUTf3AUw0x6r/EXAkn4OssDyFWB0+DaHnHbVeFmDkPz43y+pSlSPbW2oXWgXYrzzf+cnZAYh04g==","signatures":[{"sig":"MEUCIEZ/LOdooWIpuEfwxQABgGfxRg6RHKxlG+jPTWNhV/TUAiEA84mamQovj8m0wyeakkTdJlgR+j2HTB7fpPmOVdkVfTU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","name":"elasticsearchclient","author":{"name":"Phillip Rosen","email":"phill.rosen@gmail.com"},"readme":"Elastic Search Client\n=====================\n\nA node.js client for elasticsearch (http://www.elasticsearch.com). \n\n## Installation\n\n```\nnpm install elasticsearchclient\n```\n\n## Executing commands on elasticsearch\n\n```javascript\nElasticSearchClient = require('elasticsearchclient');\n\nvar serverOptions = {\n    host: 'localhost',\n    port: 9200,\n};\n```\n\nOR specify multiple hosts\n\n```javascript\nvar serverOptions = {\n    hosts:[\n        {\n            host: 'localhost',\n            port: 9200\n        }]\n};\n```\n\n```javascript\nvar elasticSearchClient = new ElasticSearchClient(serverOptions);\n\nvar qryObj = {\n    field : term\n}\n\nelasticSearchClient.search('my_index_name', 'my_type_name', qryObj)\n            .on('data', function(data) {\n                console.log(JSON.parse(data))\n            })\n            .on('done', function(){\n                //always returns 0 right now\n            })\n            .on('error', function(error){\n                console.log(error)\n            })\n            .exec()\n\nelasticSearchClient.index('my_index_name', 'my_type_name', {'name':'name', id:\"1111\"})\n            .on('data', function(data) {\n                console.log(data)\n            })\n            .exec()\n\n//Bulk index example\nvar commands = []\ncommands.push({ \"index\" : { \"_index\" :'my_index_name', \"_type\" : \"my_type_name\"} })\ncommands.push({field1:'value',field2:'value'})\n\n\n    elasticSearchClient.bulk(commands, {})\n            .on('data', function(data) {})\n            .on('done', function(done){})\n            .on('error', function(error){})\n            .exec();\n\n```\n\nTwitter stream:\nSeems to be a problem in the es with deleting streams. May require a node restart for modifications/deletes to take effect\n\n\n```javascript\nelasticSearchClient.createOrModifyTwitterRiver(riverName, riverData)\n    .on('data', function (data) {\n        console.log(data)\n        assert.ok(JSON.parse(data).ok)\n    })\n    .on('error',\n    function (error) {\n        console.log(error)\n        assert.ok(false)\n    }).exec()\n```\n\n## What can i do?\n\nMost of the API (http://www.elasticsearch.org/guide/reference/api/) is implemented. \n\n## License\n\nCopyright (c) 2011 Phillip Rosen\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","engines":{"node":">= 0.3.0"},"_npmUser":{"name":"phill.rosen","email":"phill.rosen@gmail.com"},"repository":{"url":"git://github.com/phillro/node-elasticsearch-client.git","type":"git"},"_npmVersion":"1.1.21","description":"A client for Elastic Search","maintainers":[{"name":"phill.rosen","email":"phill.rosen@gmail.com"}],"_nodeVersion":"v0.6.11","dependencies":{},"_defaultsLoaded":true,"devDependencies":{},"_engineSupported":true,"optionalDependencies":{},"_id":"elasticsearchclient@0.2.2","version":"0.2.2"}