[SERVER-38407] Unable to Query and hence remove collection with Date field using equals operator on two date fields for comparison Created: 05/Dec/18  Updated: 07/Dec/18  Resolved: 07/Dec/18

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Karthick [X] Assignee: Danny Hatcher (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 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.

 

 

 



 Comments   
Comment by Danny Hatcher (Inactive) [ 07/Dec/18 ]

Hello Karthick,

Thanks for your report. Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group.

See also our Technical Support page for additional support resources.

Thank you,

Danny

Comment by Karthick [X] [ 06/Dec/18 ]

Hi Team,

 

Could you Please help / clarify with your valuable response !!

Generated at Thu Feb 08 04:48:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.