I have a collection with documents containing an array as below. I would like to remove the specific array objects from the “changes” array, based on the value of “updatedTimestamp” (older than 2 years) from this collection and place it in another collection.
I am able to project based on requirement using aggregation but this should be done using find() as there is a restriction for this use case. The restriction is Online Archive does not allow aggregation pipeline and it accepts custom criteria in the form of a JSON which has to be as db.collection.find({}).
Based on the above, my interpretation is that you wish to move the contents (or specific element which matches the $filter conditions in the changes array field) to another collection and have these archived using Online Archive - Is this correct? - i.e., You only want the elements filtered archived rather than the updated document.
If the above is somewhat correct I believe you’re only wanting to archive the following then?:
Array properties are currently not supported in partition fields for Online Archive. You can raise a feedback post, which the product team monitor, with your use case details in which others can vote for.