Monday, November 08, 2010 at 12:05 AM.


on indexLocalSite (adrSite, siteName, {
	<<Index one website (or table).
	local (adrIndex = searchEngine.getIndexAddress (siteName)); //address of site index
	local (adrPreviews = searchEngine.getPreviewsAddress (siteName)); //address of site previews
	on indexTable (adrTable) {
		local (i);
		for i = 1 to sizeOf (adrTable^) {
			local (adrItem = @adrTable^ [i]);
			if html.traversalSkip (adrItem) {
			if typeOf (adrItem^) == tableType {
				indexTable (adrItem)}
			else {
				searchEngine.indexLocalPage (adrItem, siteName, adrIndex, adrPreviews, adrStopWords);
				sys.systemTask ()}};
		return (true)};
	indexTable (adrSite);
	<<Save index database.
	searchEngine.saveIndex (siteName, adrIndex);
	return (true)}

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.