{"action":"created","issue":{"url":"https://api.github.com/repos/Alino/Mongo2ES/issues/11","repository_url":"https://api.github.com/repos/Alino/Mongo2ES","labels_url":"https://api.github.com/repos/Alino/Mongo2ES/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/Alino/Mongo2ES/issues/11/comments","events_url":"https://api.github.com/repos/Alino/Mongo2ES/issues/11/events","html_url":"https://github.com/Alino/Mongo2ES/issues/11","id":148770298,"number":11,"title":"I am unable to sync my ES from mongo meteor","user":{"login":"jovar07","id":17453234,"avatar_url":"https://avatars.githubusercontent.com/u/17453234?v=3","gravatar_id":"","url":"https://api.github.com/users/jovar07","html_url":"https://github.com/jovar07","followers_url":"https://api.github.com/users/jovar07/followers","following_url":"https://api.github.com/users/jovar07/following{/other_user}","gists_url":"https://api.github.com/users/jovar07/gists{/gist_id}","starred_url":"https://api.github.com/users/jovar07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jovar07/subscriptions","organizations_url":"https://api.github.com/users/jovar07/orgs","repos_url":"https://api.github.com/users/jovar07/repos","events_url":"https://api.github.com/users/jovar07/events{/privacy}","received_events_url":"https://api.github.com/users/jovar07/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-15T21:09:53Z","updated_at":"2016-04-17T18:23:04Z","closed_at":null,"body":"Hi. I have been trying to use elasticsearch with meteor, which I confess I am a complete newbie. My elasticsearch is running, and so is meteor. I created an watchers.js and modified it as follows. However, I get an error: W20160416-02:25:35.727(5.5)? (STDERR) elasticsearch host was not set, you must set it up!!!..Could you please help me. I am not sure where I am making the mistake. I really need this feature in my app; so any suggestions would be appreciated.\r\n\r\n\r\nif (Meteor.isServer) {\r\n\r\n  Meteor.startup(function () {\r\n    console.log('running watchers');\r\n\r\n    // simple watching of collection:\r\n    new Mongo2ES({\r\n      collectionName: 'chemcast',\r\n      ES: {\r\n        host: 'http://127.0.0.1:9200',\r\n        index: 'manufacturers',\r\n        type: 'suggestions'\r\n      }\r\n    });\r\n\r\n\r\n    // watching collection and copy all already existing data:\r\n    new Mongo2ES({\r\n      collectionName: 'chemcast',\r\n      ES: {\r\n        host: 'http://127.0.0.1:9200',\r\n        index: 'manufacturers',\r\n        type: 'suggestions'\r\n      }\r\n    }, undefined, true);\r\n\r\n\r\n    // watching collection and using transform function (transforming data before sending it to ElasticSearch):\r\n    var transform = function (doc) {\r\n      doc.fullName = doc.firstName + \" \" + doc.lastName;\r\n      return doc;\r\n    };\r\n\r\n    new Mongo2ES({\r\n      collectionName: 'chemcast',\r\n      ES: {\r\n        host: 'http://127.0.0.1:9200',\r\n        index: 'manufacturers',\r\n        type: 'suggestions'\r\n      }\r\n    }, transform);\r\n\r\n\r\n  });\r\n\r\n}"},"comment":{"url":"https://api.github.com/repos/Alino/Mongo2ES/issues/comments/211075382","html_url":"https://github.com/Alino/Mongo2ES/issues/11#issuecomment-211075382","issue_url":"https://api.github.com/repos/Alino/Mongo2ES/issues/11","id":211075382,"user":{"login":"Alino","id":763194,"avatar_url":"https://avatars.githubusercontent.com/u/763194?v=3","gravatar_id":"","url":"https://api.github.com/users/Alino","html_url":"https://github.com/Alino","followers_url":"https://api.github.com/users/Alino/followers","following_url":"https://api.github.com/users/Alino/following{/other_user}","gists_url":"https://api.github.com/users/Alino/gists{/gist_id}","starred_url":"https://api.github.com/users/Alino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alino/subscriptions","organizations_url":"https://api.github.com/users/Alino/orgs","repos_url":"https://api.github.com/users/Alino/repos","events_url":"https://api.github.com/users/Alino/events{/privacy}","received_events_url":"https://api.github.com/users/Alino/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T18:23:04Z","updated_at":"2016-04-17T18:23:04Z","body":"hi @jovar07 , it seems that you didn't set env variable for elastic search.\r\nbefore running Mongo2ES, try this command first if you are on linux or os x system ```export elasticsearchHost=\"http://127.0.0.1:9200\";```"}}