Solprovider Lenya Kongregate Registration for Free Flash Games and Chat with solprovider

Testing Search

This is useful if you need to test search-and-results.xsp
Add this to publication-sitemap.xmap:
<map:match pattern="**/*.searchtest">
<map:generate type="serverpages" src="lenya/content/search/search-and-results.xsp" label="xml">
<map:parameter name="max-hits-per-page" value="10"/>
<map:parameter name="max-pages" value="10"/>
<map:parameter name="excerpt-offset" value="150"/>
<map:parameter name="number-of-pubs" value="1"/>
<map:parameter name="pub0-id" value="{page-envelope:publication-id}"/>
<map:parameter name="pub0-name" value="{page-envelope:publication}"/>
<map:parameter name="pub0-index-dir" value="./work/search/lucene/index/{2}/index"/>
<map:parameter name="pub0-search-fields" value="contents,title"/>
<map:parameter name="pub0-excerpt-dir" value="./content/{2}"/>
<map:parameter name="pub0-prefix" value=""/>
<map:serialize type="xml"/>

Then try:{pub}/live/index.searchtest?query={test}
{test} can be a word you know should be in the index, or an author's name. An author's name should return every document they created.

Testing Modifications

For search-and-results.xsp, as long as the above test returns something, you can check what is happening by adding tags to the XML:
<language-check><xsp:attribute name="doc"><xsp:expr>docLanguage</xsp:expr></xsp:attribute></language-check>

Add just a tag to know whether an IF works.
Add a tag with a value or a tag with attributes to check your variables.

<< SecurityContents >>

Contact Solprovider
Paul Ercolino