Reset Ektron Search Property on Content

The issue you have with Ektron is that when you update the Is Searchable checkbox on a folder, it is for all future content. Existing content is left as is. The SQL will update the Is Searchable to the parent folders setting.


DECLARE @folderID int
DECLARE @searchable int
--------------------------------------------------------
DECLARE @MyCursor CURSOR
SET @MyCursor = CURSOR FAST_FORWARD
FOR
SELECT [folder_id], [is_content_searchable]
FROM [content_folder_tbl]
OPEN @MyCursor
FETCH NEXT FROM @MyCursor
INTO @folderID, @searchable
WHILE @@FETCH_STATUS = 0
BEGIN
print @folderID
UPDATE content SET searchable = @searchable WHERE folder_id = @folderID
FETCH NEXT FROM @MyCursor
INTO @folderID, @searchable
END
CLOSE @MyCursor
DEALLOCATE @MyCursor