toystars / elasticsearch-sync

ElasticSearch and MongoDB sync package for Meteor
MIT License
13 stars 3 forks source link

This still works ? #8

Open ricardolimaui opened 6 years ago

ricardolimaui commented 6 years ago

I'm getting a lot of errors with last version of elasticsearch. Is it supposed to still work? Thank you

toystars commented 6 years ago

This has not been tested with elastic search version 5.0 and above.

ricardolimaui commented 6 years ago

Hi again, this error means it is not compatible ? I20180613-13:00:11.683(1)? Exception in callback of async function: ReferenceError: getWatcher is not defined I20180613-13:00:11.683(1)? at ESMongoSync.Oplog.on.Meteor.bindEnvironment.doc (packages/toystars:elasticsearch-sync/lib/index.js:188:25) I20180613-13:00:11.683(1)? at runWithEnvironment (packages/meteor.js:1241:24)

Thank you!

toystars commented 6 years ago

@ricardolimaui that is not a compatibility error. Actually, this PR #7 has been opened to fix this error. I will get it merged and push a new release

toystars commented 6 years ago

@ricardolimaui I just published version 0.1.2. This should fix the error.

ricardolimaui commented 6 years ago

Thank you! Now it's working but i think i found some more bugs. If the root of the json has something with the key "name" it is only saving in elastic search "undefined undefined". Change/add the name of the key it is also giving an error "0180613-15:48:39.442(1)? Exception in callback of async function: TypeError: Cannot convert undefined or null to object I20180613-15:48:39.690(1)? at Function.keys () I20180613-15:48:39.694(1)? at DotObject.object (/home/ricardo/.meteor/packages/toystars_elasticsearch-sync/.0.1.2.l9t3yh.j28w++os+web.browser+web.cordova/npm/node_modules/dot-object/index.js:119:10) I20180613-15:48:39.694(1)? at Function.object (/home/ricardo/.meteor/packages/toystars_elasticsearch-sync/.0.1.2.l9t3yh.j28w++os+web.browser+web.cordova/npm/node_modules/dot-object/index.js:62:31) I20180613-15:48:39.695(1)? at Object.ESMongoSync.Util.update (packages/toystars:elasticsearch-sync/lib/util.js:192:19) I20180613-15:48:39.697(1)? at ESMongoSync.Oplog.on.Meteor.bindEnvironment.doc (packages/toystars:elasticsearch-sync/lib/index.js:197:28) I20180613-15:48:39.698(1)? at runWithEnvironment (packages/meteor.js:1241:24) "

"key":"value", "_id" : "58b41a368c5da2520e6b335b", "namede" : "antena55", "manufacturer" : "5908aa93023a54c78115b9b8", "fruit" : "strawberry",

Can you reproduce this error too? Thank you

toystars commented 6 years ago

@ricardolimaui I will look into this

ricardolimaui commented 6 years ago

ok ok thank you

ricardolimaui commented 6 years ago

hi still got problems I20180629-11:02:13.196(1)? { Error: Content-Type header [application/x-ldjson] is not supported I20180629-11:02:13.196(1)? at respond (/Users/joseabrantes/.meteor/packages/toystars_elasticsearch-sync/.0.1.2.1b77vx6.w4jz++os+web.browser+web.cordova/npm/node_modules/elasticsearch/src/lib/transport.js:280:15) I20180629-11:02:13.196(1)? at checkRespForFailure (/Users/joseabrantes/.meteor/packages/toystars_elasticsearch-sync/.0.1.2.1b77vx6.w4jz++os+web.browser+web.cordova/npm/node_modules/elasticsearch/src/lib/transport.js:239:7) I20180629-11:02:13.197(1)? at HttpConnector. (/Users/joseabrantes/.meteor/packages/toystars_elasticsearch-sync/.0.1.2.1b77vx6.w4jz++os+web.browser+web.cordova/npm/node_modules/elasticsearch/src/lib/connectors/http.js:155:7) I20180629-11:02:13.197(1)? at IncomingMessage.wrapper (/Users/joseabrantes/.meteor/packages/toystars_elasticsearch-sync/.0.1.2.1b77vx6.w4jz++os+web.browser+web.cordova/npm/node_modules/lodash/index.js:3095:19) I20180629-11:02:13.197(1)? at emitNone (events.js:111:20) I20180629-11:02:13.197(1)? at IncomingMessage.emit (events.js:208:7) I20180629-11:02:13.197(1)? at endReadableNT (_stream_readable.js:1064:12) I20180629-11:02:13.198(1)? at _combinedTickCallback (internal/process/next_tick.js:138:11) I20180629-11:02:13.198(1)? at process._tickDomainCallback (internal/process/next_tick.js:218:9) I20180629-11:02:13.198(1)? status: '406', I20180629-11:02:13.198(1)? displayName: 'NotAcceptable', I20180629-11:02:13.198(1)? message: 'Content-Type header [application/x-ldjson] is not supported' } I20180629-11:46:41.303(1)? Exception in callback of async function: TypeError: Cannot convert undefined or null to object I20180629-11:46:41.313(1)? at Function.keys () I20180629-11:46:41.314(1)? at DotObject.object (/Users/joseabrantes/.meteor/packages/toystars_elasticsearch-sync/.0.1.2.1b77vx6.w4jz++os+web.browser+web.cordova/npm/node_modules/dot-object/index.js:119:10) I20180629-11:46:41.314(1)? at Function.object (/Users/joseabrantes/.meteor/packages/toystars_elasticsearch-sync/.0.1.2.1b77vx6.w4jz++os+web.browser+web.cordova/npm/node_modules/dot-object/index.js:62:31) I20180629-11:46:41.314(1)? at Object.ESMongoSync.Util.update (packages/toystars:elasticsearch-sync/lib/util.js:192:19) I20180629-11:46:41.314(1)? at ESMongoSync.Oplog.on.Meteor.bindEnvironment.doc (packages/toystars:elasticsearch-sync/lib/index.js:197:28) I20180629-11:46:41.314(1)? at runWithEnvironment (packages/meteor.js:1241:24) I20180629-11:47:46.764(1)? Exception in callback of async function: TypeError: Cannot convert undefined or null to object I20180629-11:47:46.765(1)? at Function.keys () I20180629-11:47:46.767(1)? at DotObject.object (/Users/joseabrantes/.meteor/packages/toystars_elasticsearch-sync/.0.1.2.1b77vx6.w4jz++os+web.browser+web.cordova/npm/node_modules/dot-object/index.js:119:10) I20180629-11:47:46.767(1)? at Function.object (/Users/joseabrantes/.meteor/packages/toystars_elasticsearch-sync/.0.1.2.1b77vx6.w4jz++os+web.browser+web.cordova/npm/node_modules/dot-object/index.js:62:31) I20180629-11:47:46.767(1)? at Object.ESMongoSync.Util.update (packages/toystars:elasticsearch-sync/lib/util.js:192:19) I20180629-11:47:46.768(1)? at ESMongoSync.Oplog.on.Meteor.bindEnvironment.doc (packages/toystars:elasticsearch-sync/lib/index.js:197:28) I20180629-11:47:46.768(1)? at runWithEnvironment (packages/meteor.js:1241:24)

The first part only happens with last elasticsearch version. The second part occours when exist an update to one file

Thank you