pageIDlist = ''; // PageID List of Items to be remove from the search index searchCollectionList = 'collectionA,collectionB'; searchWrapper = Server.CommonSpot.UDF.search.getCollectionWrapper(searchCollectionList); for ( i=1; i <= ListLen(searchCollectionList); i++ ) { collectionName = ListGetAt(searchCollectionList,i); for ( p=1;p <= ListLen(pageid); p++ ) { pgid = ListGetAt(pageid,p); searchWrapper.removePageFromIndex(collectionName=collectionName,pageID=pgid); WriteOutput('
PageID: #pgid# Removed!'); } searchWrapper.doCommit(name=collectionName); WriteOutput('
Changes Committed for Collection: #collectionName#'); WriteOutput('
'); }