@gesdisc/mongo-stream
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -26,3 +26,3 @@ { | ||
"index": "test", | ||
"type": "$self", | ||
"type": "_doc", | ||
"parent": "parentCollectionName", | ||
@@ -29,0 +29,0 @@ "parentId": "childFieldPointingToParent", |
@@ -88,4 +88,2 @@ const logger = new (require('service-logger'))(__filename); | ||
logger.debug('bulk op for collection ', CollectionManager.elasticManager.mappings[this.collectionName]) | ||
bulkOp.push({ | ||
@@ -92,0 +90,0 @@ index: { |
@@ -89,4 +89,2 @@ const elasticsearch = require('elasticsearch'); | ||
logger.debug('delete doc in collection ', this.mappings[changeStreamObj.ns.coll]) | ||
this.bulkOp.push({ | ||
@@ -106,4 +104,2 @@ delete: { | ||
try { | ||
logger.debug('get existing doc in collection ', this.mappings[collectionName]) | ||
const doc = await this.esClient.search({ | ||
@@ -130,3 +126,2 @@ index: this.getESIndexName(collectionName), | ||
try { | ||
logger.debug('delete elastic collection ' ,this.mappings[collectionName]) | ||
// First get a count for all ES docs of the specified type | ||
@@ -153,4 +148,2 @@ searchResponse = await this.esClient.search({ | ||
for (let j = 0; j < dumpDocs.length; j++) { | ||
log.debug('Trying to delete docs in collection ', this.mappings[collectionName]) | ||
bulkDelete.push({ | ||
@@ -204,3 +197,7 @@ delete: { | ||
logger.info(JSON.stringify(bulkOp)) | ||
try { | ||
logger.info(JSON.stringify(bulkOp[0].index)) | ||
} catch (err) { | ||
logger.info("Failed to look at index") | ||
} | ||
@@ -207,0 +204,0 @@ return this.esClient.bulk({ |
{ | ||
"name": "@gesdisc/mongo-stream", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Sync data from Mongodb to Elasticsearch", | ||
@@ -5,0 +5,0 @@ "main": "server.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
889213
856