Frontier Tutorials / Indexing a Website / Hints and Tips

Hints and Tips

Here are a few tips on working with the Indexer Suite in your website.

Clearing Index Entries for a Page

fatpage picture space picture This page is a Fat Page. It includes the ClearPageFromIndex script, encoded by and for Frontier. To retrieve the script(s), save the page as source text and open it using the File->Open command.

To clear the entries for a single page from the index, you need to walk the index (using indexer.VisitIndex) and compile a list of all the entries that point to the page, then make a second pass to delete each entry.

A script called ClearPageFromIndex that does this is embedded in this page in fatpage format.

Indexing Pages Automatically

To index your pages automatically when you render them, install the ClearPageFromIndex script from this page and add the following lines to your ["#filters"].finalFilter script:

ClearPageFromIndex( @adrPageTable^.indices^.topic, adrPageTable^.adrObject )
ClearPageFromIndex( @adrPageTable^.indices^.titleAlpha, adrPageTable^.adrObject )
websites.mysite.["#tools"].BuildTopicsIndex( adrPageTable^.adrObject, inReplaceIndices:false )
websites.mysite.["#tools"].BuildTitleAlphaIndex( adrPageTable^.adrObject, inReplaceIndices:false )

This clears the page from each index, then re-adds it.

And here's a practical application: an index of pages with downloadable scripts in this tutorial.

Tutorial Contents
Indexing a Website
Bricks and Mortar
Plan the Project
Add Keywords
Build The Keyword Index
Display The Keyword Directory
Build the Alphabetical Index
Display The Alphabetical Directory
Summary
Hints and Tips
Downloadable Scripts
About the Author