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


on mergeResults (tableList, adrTable) {
	<<Add elements of tables together.
		<<Add 4000 to the value of an item for each table > 1 it appears in.
		<<Old code:
			<<local (i, j)
			<<for i = 1 to sizeOf (tableList)
				<<for j = 1 to sizeOf (tableList [i]^)
					<<local (adrItem = @tableList [i]^ [j])
					<<local (itemName = nameOf (adrItem^))
					<<local (itemValue = adrItem^)
					<<if not defined (adrTable^.[itemName])
						<<adrTable^.[itemName] = itemValue
						<<adrTable^.[itemName] = adrTable^.[itemName] + itemValue + 4000
			<<return (true)
	kernel (searchEngine.mergeResults)}

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.