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

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

      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.

       

       

       

            Assignee:
            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            Reporter:
            Karthick Karthick [X]
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: