-
Hi, We need to clear a type of content items overnight, i.e., to delete all records that belong to a specific content type. The current working implementation is:
Question: is there a better way to do that? Rather than deleting them one by one, can we do any kind of hard delete in one go? Notes those content items are also indexed (Lucene). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Normally we use the That said when we remove an item it is only soft removed, meaning that we only set both Published and Latest to false, so it is no more an active version but still there. So in your first query you would need to filter those that are Published OR Latest. |
Beta Was this translation helpful? Give feedback.
Normally we use the
IContentManager.RemoveAsync()
method that will trigger the related handiers, for example to cleanup some Index Tables (not all as we keep the row for some tables), remove the items from the Lucene indexes, and so on. There is no bulk method for this so you will still need to iterate over all items.That said when we remove an item it is only soft removed, meaning that we only set both Published and Latest to false, so it is no more an active version but still there. So in your first query you would need to filter those that are Published OR Latest.