![]() |
| Frontier Tutorials / Indexing a Website / Hints and Tips |
Here are a few tips on working with the Indexer Suite in your website.
|
|---|
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.
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.