Cleaning a search collection removes the data associated with that search collection, but leaves the search collection configuration data intact. To completely remove a search collection and its data, see Deleting Search Collections.
The following is an example in C# of purging the data associated with a given search collection through the SOAP API:
In C#:
SearchCollectionClean scc = new SearchCollectionClean(); scc.collection = COLLECTION; this.searchCollectionStopServices(); port.SearchCollectionClean(scc); SearchCollectionStatus scs = new SearchCollectionStatus(); scs.collection = COLLECTION; scs.staleok = false; SearchCollectionStatusResponse scsr = port.SearchCollectionStatus(scs); if (scsr == null) { }