node.js - indexing elasticsearch documents - till infity -


I am very new to Node.js - and hopefully do not ask stupid questions ...

I am trying to index a document in elastic search - which works.

  var elasticsearch = requires ('elasticsearch'); Function author (info) {var client = elastic search. Client ({host: 'server03: 9200'}); Client.index ({index: 'fhem', type: 'state', body: {time: info.time, alias: information.alias, state: info.state, room: info.room}}}}  

My problem begins after indexing the document. The function will not come out, so I can do other things.

The above work is called by the following line:

  index_data.writetoela (data);  

'Data' is an array of values, which should be indexed for elastic search.

Can someone advise me, why is this happening?

Bjoern

It looks like this for me Should:

  var elasticsearch = Required ('elastic search'); Function author (info) {var client = elastic search. Client ({host: 'server03: 9200'}); Client.index ({index: 'fhem', type: 'state', body: {time: info.time, alias: information.alias, state: info.state, room: info.room}}, function (mistake, Resp) {// error response console.info here (mistake); console.info (resp);});  

Use nodespector to debug your app:


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -