Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-38407

Unable to Query and hence remove collection with Date field using equals operator on two date fields for comparison

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None

      Description

      Hi Team,

       

      Good Evening.

      I have an requirement. I have a collection with two date fields say created_date and update_date along with other columns .

      The date fields are ISO Date with time stamp included. The collections hold 60 Million records and my requirement is to remove all records say around 16 M records (counts derived using aggregation framework) using the condition created_date == updated_date in the db.collection.remove(), after converting the date fields to DD-MM-YYYY.

       

      While we understand this is feasible with Aggregation frame work , would like to understand if this can be achieved using a simple query that can be tied to db.collection.remove.

       

      Also please help with the example for .remove and .aggergate methods.

       

       

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: