diff --git a/src/controller/cve.controller/cve.controller.js b/src/controller/cve.controller/cve.controller.js index 6f5d9294d..a2303c88e 100644 --- a/src/controller/cve.controller/cve.controller.js +++ b/src/controller/cve.controller/cve.controller.js @@ -113,6 +113,7 @@ async function getFilteredCves (req, res, next) { for (let i = 0; i < timeModified.timeStamp.length; i++) { if (timeModified.dateOperator[i] === 'lt') { if (cnaModified) { + options.hint = { 'cve.containers.cna.providerMetadata.dateUpdated': 1 } query['cve.containers.cna.providerMetadata.dateUpdated'] = {} // Due to this not being the mongo created date object, we need to actually check the "ISO String" version of this _NOT_ the date object that is being created in the middleware query['cve.containers.cna.providerMetadata.dateUpdated'].$lt = timeModifiedLtDateObject.toISOString() @@ -121,6 +122,7 @@ async function getFilteredCves (req, res, next) { } } else { if (cnaModified) { + options.hint = { 'cve.containers.cna.providerMetadata.dateUpdated': 1 } query['cve.containers.cna.providerMetadata.dateUpdated'] = {} // Due to this not being the mongo created date object, we need to actually check the "ISO String" version of this _NOT_ the date object that is being created in the middleware query['cve.containers.cna.providerMetadata.dateUpdated'].$gt = timeModifiedGtDateObject.toISOString()