spike [-<option> . . .]
Spikes (deletes) objects.
This command is also available in cmd4 as spike.
Options
[-ids] <comma-separated database ids>
Comma-separated id(s) of the object to spike
-code <spike code>
Deleting type
-extend <comma-separated list of attribute types - specified using their full name>
Spike also all the objects that reference the specified ones via these attributes
-extendunref <comma-separated list of attribute types - specified using their full name>
Spike or eliminate references from all the objects that reference the specified ones via these attributes. Referencing objects that do not reference any other non-deleted object and that belongs to partitions with the 'extendSpike' attribute set are deleted, all other objects are un-referenced.
It is a list of attributes (similar to the parameters extend and unref) that is used as follows: all the objects that reference objects being deleted via the extendunref attributes are either deleted or the reference is removed depending on their partition and if they are referenced by other objects or not.
Example: the story with id 872 references the image id 815 via its attribute story.images - so:
srv4 spike 815 -extend story.images
spikes both the image 815 and the story 872;
srv4 spike 815 -unref story.images
spikes the image 815 and removes the reference to it from the story 872; finally
srv4 spike 815 -extendunref story.images
spikes the image 815 and spikes the story 872 if it has no partition, or it is in a partition with 'extendSpike' set to true AND it is not referenced by any other object. If he story 872 is in a partition with extendSpike set to false OR story 872 is referenced by any other object then it is not deleted and the reference to the image 815 is removed.
-recurse
When extending the list of objects to be deleted to the referencing one consider also indirect references - up to any depth (i.e. objects referencing an object that references an object . . . that references one of the objects to be deleted)
-unref <comma-separated list of attribute types - specified using their full name>
Eliminate references to the objects being deleted from the specified attributes
-purge <time-span; e.g. 4:30 for 4 hours and 30 minutes, 2.06:00 for 2 days and 6 hours>
Used to compute a 'purge date-time' for the objects equal to the spike date-time plus the time-span. Specifies for how long the objects will be kept in the system before they are purged (permanently deleted). If not specified the objects will be kept for the default time defined at system level
-in <string>
Input log file name. All entries of the log file (coming from a 'bulk' operation) that contain object ids (i.e. ids of created objects) will be deleted. When this option is specified, the 'ids' and 'conditions' option are ignored
-conditions <string>
Name of the file or of the search configuration containing the search conditions used to select the objects to spike
-by <integer>
Number of objects to spike together in a single operation. Greater the number quicker the operation is, and longer locks are put on the database. Optional, default value 0 (i.e. all items).
-pars <list of name-value pairs in the format 'name1:value1;name2:value2...'; e.g. 'folderId:30;cmd:up' to define a 'folderId' parameter with value 30 and a 'cmd' parameter with value 'up'.>
Optional parameters used to replace variables in the search conditions.
Example
•(available since 1.5)
Spike all content from the folder /Users/reba3':
srv4 spike
-conditions gn4:folderObject[gn4:folderRef/nav:refObject/gn4:folder/@path='/Users/reba3']
-unref story.objs,document.images,photoCaption.ref,pageLayer.imgs,pubDest.objs
-extend txtGeometry.txtRef
•Spike all files and unreference whatever is possible:
srv4 spike
-ids id1,id2,id3
-extend master.editionRef,page.editionRef,extDoc.editionRef,pageLayer.pages,txtGeometry.txtRef,txtGeometry.jumps,pagePreview.pageRef,article.pageLayers.pageRef,webComment.objectRef
-extendunref linkObject.pageLayers.editionRef,linkObject.pageLayers.pageRef,linkObject.pageLayers.layerRef,pageLayer.txtGeos
-unref linkObject.assigns,linkObject.assigns.pageRef,linkObject.assigns.extDocRef,pubDest.objs,pubDest.preObjs
–recurse
See also
Delete editions by command line
Delete editions with shared layers by command line
Delete individual pages and layers by command line