@gesdisc/mongo-stream
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -87,2 +87,5 @@ const logger = new (require('service-logger'))(__filename); | ||
delete nextObject._id; | ||
logger.debug('bulk op for collection ', CollectionManager.elasticManager.mappings[this.collectionName]) | ||
bulkOp.push({ | ||
@@ -89,0 +92,0 @@ index: { |
@@ -88,2 +88,5 @@ const elasticsearch = require('elasticsearch'); | ||
}); | ||
logger.debug('delete doc in collection ', this.mappings[changeStreamObj.ns.coll]) | ||
this.bulkOp.push({ | ||
@@ -103,2 +106,4 @@ delete: { | ||
try { | ||
logger.debug('get existing doc in collection ', this.mappings[collectionName]) | ||
const doc = await this.esClient.search({ | ||
@@ -125,2 +130,3 @@ 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 | ||
@@ -147,2 +153,4 @@ 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({ | ||
@@ -149,0 +157,0 @@ delete: { |
{ | ||
"name": "@gesdisc/mongo-stream", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Sync data from Mongodb to Elasticsearch", | ||
@@ -12,3 +12,3 @@ "main": "server.js", | ||
"type": "git", | ||
"url": "https://github.com/everyone-counts/mongo-stream" | ||
"url": "https://git.earthdata.nasa.gov/projects/GUUI/repos/mongo-stream/browse" | ||
}, | ||
@@ -15,0 +15,0 @@ "keywords": [ |
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
889536
856