Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.searchEngine.getPreviewsAddress
on getPreviewsAddress (siteName) {
<<Previews are stored inside the same guest database as the index.
<<Return the address of the previews table for this index.
<<Get the address of the index table from searchEngine.getIndexAddress.
<<A side effect is that we ensure the database exists and is open.
local (adr = searchEngine.getIndexAddress (siteName));
local (adrPreviews);
adr = parentOf (adr^);
adrPreviews = @adr^.previews;
if not defined (adrPreviews^) {
new (tableType, adrPreviews)};
return (adrPreviews)}
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.