The Advanced-Select theme is composed of the following:
Advanced-Select Search Form
The Advanced-Select search form template, advsel.hts, provides a multiline query text box, checkboxes for the collections available to the search, and a dropdown list for selecting the results template.
advsel.hts. It is only a portion of advsel.hts and is out of context from the whole file which is required for processing.
- <FORM METHOD="GET" ACTION="$$VTopicScriptName">
- <INPUT TYPE=HIDDEN NAME="ServerKey" VALUE="Primary">
- <DD><H4>Collections:</H4>
- <% x = 0 %>
- <% coll_count = Count( Collections ) %>
- <% if coll_count > 0 %>
- <CENTER>
- <TABLE BORDER=0 WIDTH=100%>
- <% foreach coll in Collections %>
- <%-- trim out the collections that are not enabled or is not in the default list --%>
- <% if exists( coll.state ) AND 0 = StrComp( coll.state, "Enabled" ) %>
- <% if exists( coll.defaultList ) AND 0 = StrComp( coll.defaultList, "True" ) %>
- <% x = x + 1 %>
- <% if x % 2 %>
- <TR>
- <TD WIDTH=25%></TD>
- <TD><INPUT TYPE="checkbox" NAME="collection" VALUE="$$coll.Alias" CHECKED>$$coll.Name</TD>
- <% else %>
- <TD><INPUT TYPE="checkbox" NAME="collection" VALUE="$$coll.Alias" CHECKED>$$coll.Name</TD>
- </TR>
- <% endif %>
- <% endif %>
- <% endif %>
- <% endfor %>
- <% if x % 2 %>
- </TR>
- <% endif %>
- </TABLE>
- </CENTER>
- <% else %>
- <DD>No collections.
- <% endif %>
- <BR>
- <BR>
- <TABLE>
- <TR>
- <TD VALIGN=CENTER><DD><H4>Results:</H4></TD>
- <TD VALIGN=CENTER>
- <SELECT NAME="ResultTemplate">
- <OPTION SELECTED VALUE="selqbe.hts">Default
- <OPTION VALUE="selqbe.hts">Query By Example
- <OPTION VALUE="selclust.hts">Clustered
- </SELECT>
- </TD>
- </TR>
- </TABLE>
- <INPUT TYPE="HIDDEN" NAME="ResultStyle" VALUE="normal">
- <INPUT TYPE="HIDDEN" NAME="ClusterPageSize" VALUE="5">
- <INPUT TYPE="HIDDEN" NAME="ClusterCount" VALUE="5">
- <CENTER>
- <TABLE BORDER=0>
- <TR>
- <TD COLSPAN=2><b>Enter words or phrases, separated by commas:</b></TD>
- </TR>
- <TR>
- <TD COLSPAN=2><TEXTAREA NAME="QueryText" ROWS=2 COLS=50></TEXTAREA></TD>
- </TR>
- <TR>
- <TD><INPUT TYPE="image" SRC="/search97img/search.gif" NAME="SEARCH-97" ALT="Search" BORDER=0></TD>
- <TD ALIGN=RIGHT><INPUT TYPE="reset" VALUE=" Clear "></TD>
- </TR>
- </TABLE>
- </CENTER>
- <TR>
- <TD ALIGN=CENTER>
- <INPUT TYPE="CHECKBOX" NAME="ViewTemplate" VALUE="advsviep.hts">Use view template for navigating results
- </TD>
- </TR>
- </FORM>
selclust.hts, clusters the results into several groups.
selclust.hts . It is only a portion of selclust.hts and is out of context from the whole file which is required for processing.
- <TABLE>
- <TR><TD COLSPAN=4>
- <P>Your query <B><% PrintHTMLEsc(QueryText) %></B> matched <B>$$(DocsFound)</B>
- out of <B>$$(DocsSearched)</B> documents which are are grouped into <B><% Count( result.clusters ) %></B>
- clusters, shown below.
- </TD></TR>
- <TR>
- <TD COLSPAN=4>
- <%-- did it find anything? --%>
- <% if DocsFound > 0 then %>
- <TABLE>
- <% foreach cluster in result.clusters %>
- <TR>
- <TD VALIGN=TOP><B>Cluster $$cluster.index </B></TD>
- <TD VALIGN=TOP COLSPAN=3><B>Score:</B> $$cluster.score</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP></TD>
- <TD VALIGN=TOP COLSPAN=3><B>Keywords: </B>$$cluster.keywordSummary</TD>
- </TR
- <% offset = 1 %>
- <% foreach doc in cluster.documents %>
- <TR>
- <TD></TD>
- <TD VALIGN=TOP>$$doc.score / $$doc.clusterScore </TD>
- <TD><A HREF="$$doc.URL_HTML">
- <%if exists( doc.title ) %>
- $$doc.title
- <% else %>
- $$doc.URL
- <% endif %>
- </A>
- </TD>
- </TR>
- <% offset = offset + 1 %>
- <% endfor %>
- <TR>
- <TD></TD>
- <TD></TD>
- <TD COLSPAN=2>
- <%-- Page selection ([Prev]1|2|3|4[Next]) --%>
- <% if Count(cluster.pageurls) > 1 %>
- <%-- Generate [Prev] ? --%>
- <% if cluster.prevpageurl then %>
- <A HREF="$$(cluster.prevpageurl)">[Prev]</A>
- <% endif %>
- <%-- Iterate thru each page (unless it's the current page) --%>
- <% for i = 1 to Count(cluster.pageurls) %>
- <% if i != cluster.pagenumber %>
- <A HREF="<% cluster.pageurls[i] %>">$$i</A>
- <% else %>
- $$i
- <% endif %>
- <% endfor %>
- <%-- Generate [Next] ? --%>
- <% if cluster.nextpageurl then %>
- <A HREF="$$(cluster.nextpageurl)">[Next]</A>
- <% endif %>
- <% endif %>
- </TD>
- </TR>
- <% endfor %>
- <TR><TD></TD></TR>
- </TABLE>
- <% else %>
- <H4>No documents found</H4>
- <% endif %>
- </TD>
- </TR>
- </TABLE>
selqbe.hts, displays the document hits with a brief summary and a checkbox for each document. You can click the checkbox to use the document as part of the query in the subsequent search, along with any additional query text in the text box.
selqbe.hts . It is only a portion of selqbe.hts and is out of context from the whole file which is required for processing.To pass along values such as selected collections, maximum documents and result templates,
selqbe.hts makes a call to include the filter grabprop.hts. The source for grabprop.hts appears after that for selqbe.hts below.
- <TABLE>
- <FORM METHOD="POST" ACTION="$$web.scriptname">
- <TR>
- <TD COLSPAN=4 VALIGN=CENTER>
- <INPUT TYPE="hidden" NAME="Action" VALUE="Search">
- <%-- get all of the search properties --%>
- <%--#include file="grabprop.hts" --%>
- <INPUT TYPE="text" NAME="QueryText" VALUE="<% PrintHTMLEsc(request.queryText) %>" SIZE=26> + selected documents
- <INPUT TYPE="image" SRC="/search97img/search.gif" NAME="SEARCH-97" ALT="Search" BORDER=0>
- </TD>
- </TR>
- <TR>
- <TD COLSPAN=4>
- <HR>
- </TD>
- </TR>
- <TR>
- <TD COLSPAN=4>
- <P>Your query <B><% exist( querytext ) ? PrintHTMLEsc(QueryText) : PrintHTMLEsc(qbequery) %></B> matched <B>$$(DocsFound)</B>
- out of <B>$$(DocsSearched)</B> documents which are displayed below.</B><BR>
- Please select the documents to be used for query by example.
- </TD>
- </TR>
- <% if DocsFound > 0 then %>
- <TR>
- <TD COLSPAN=4 VALIGN=TOP ALIGN=CENTER>
- <!--- Page selection ([Prev]1|2|3|4[Next]) --->
- <% if Count(result.pageurls) > 1 %>
- <% if prevpageurl then %>
- <A HREF="$$(prevpageurl)">[Prev]</A>
- <% endif %>
- <% for i = 1 to Count(result.pageurls) %>
- <% if i != pagenumber %>
- <A HREF="<% result.pageurls[i] %>">$$i</A>
- <% else %>
- $$i
- <% endif %>
- <% endfor %>
- <% if nextpageurl then %>
- <A HREF="$$(nextpageurl)">[Next]</A>
- <% endif %>
- <% endif %>
- </TD>
- </TR>
- <% endif %>
- <TR>
- <TD COLSPAN=4 VALIGN=TOP>
- <% if DocsFound > 0 then %>
- <TABLE>
- <% foreach doc in result.documents %>
- <TR>
- <TD></TD>
- <TD VALIGN=TOP>$$doc.score </TD>
- <TD VALIGN=TOP><INPUT TYPE="CHECKBOX" NAME="QBEDOC" VALUE="$$doc.QBE_KEY" <% doc.QBE_INPUT ? "CHECKED" : "" %> ></TD>
- <TD>
- <A HREF="$$doc.URL_HTML"> <% exist( doc.title ) ? PrintHtmlEsc( doc.title ) : "click here to view document" %></A>
- </TD>
- </TR>
- <% if !exists( doc.title ) %>
- <TR>
- <TD></TD>
- <TD></TD>
- <TD></TD>
- <TD><FONT SIZE=-1>URL: <i>$$doc.URL</i></FONT></TD>
- </TR>
- <% endif %>
- <TR>
- <TD></TD>
- <TD></TD>
- <TD></TD>
- <TD><FONT SIZE=-1>Summary: <I>$$doc.storedSummary</I></FONT></TD>
- </TR>
- <% endfor %>
- <TR>
- <TD></TD>
- </TR>
- </TABLE>
- <% else %>
- <H4>No documents found</H4>
- <% endif %>
- </TD>
- </TR>
- </FORM>
- </TABLE>
selqbe.hts above, in any template where you want to maintain the parameters selected in previous templates, such as using a view template:
- <%-- get all of the search properties --%>
- <%--#include file="grabprop.hts" --%>
grabprop.hts checks for any parameters for which values need to be maintained:
- <%-- GENERAL QUERY BEGIN --%>
- <% if exists( request.collection ) %>
- <% if Count( request.collection ) > 0 then %>
- <% foreach coll in request.collection %>
- <INPUT TYPE=HIDDEN NAME="Collection" VALUE="$$coll">
- <% endfor %>
- <% else %>
- <INPUT TYPE=HIDDEN NAME="Collection" VALUE="$$request.collection">
- <% endif %>
- <% endif %>
- <% if exists( request.filter ) %>
- <INPUT TYPE=HIDDEN NAME="Filter" VALUE="$$request.filter">
- <% endif %>
- <% if exists( request.resultCount ) %>
- <INPUT TYPE=HIDDEN NAME="ResultCount" VALUE="$$request.resultCount">
- <% endif %>
- <% if exists( request.resultMaxDocs ) %>
- <INPUT TYPE=HIDDEN NAME="ResultMaxDocs" VALUE="$$request.resultMaxDocs">
- <% endif %>
- <% if exists( request.resultStart ) %>
- <INPUT TYPE=HIDDEN NAME="ResultStart" VALUE="$$request.resultStart">
- <% endif %>
- <% if exists( request.resultTemplate ) %>
- <INPUT TYPE=HIDDEN NAME="ResultTemplate" VALUE="$$request.resultTemplate">
- <% endif %>
- <% if exists( request.scoreThreshold ) %>
- <INPUT TYPE=HIDDEN NAME="ScoreThreshold" VALUE="$$request.scoreThreshold">
- <% endif %>
- <% if exists( request.accessQueryText ) %>
- <INPUT TYPE=HIDDEN NAME="AccessQueryText" VALUE="$$request.accessQueryText">
- <% endif %>
- <% if exists( request.accessQueryMode ) %>
- <INPUT TYPE=HIDDEN NAME="AccessQueryMode" VALUE="$$request.accessQueryMode">
- <% endif %>
- <% if exists( request.sourceQueryText ) %>
- <INPUT TYPE=HIDDEN NAME="SourceQueryText" VALUE="$$request.sourceQueryText">
- <% endif %>
- <% if exists( request.sourceQueryMode ) %>
- <INPUT TYPE=HIDDEN NAME="SourceQueryMode" VALUE="$$request.sourceQueryMode">
- <% endif %>
- <% if exists( request.topicSet ) %>
- <INPUT TYPE=HIDDEN NAME="TopicSet" VALUE="$$request.topicSet">
- <% endif %>
- <% if exists( request.serverKB ) %>
- <INPUT TYPE=HIDDEN NAME="ServerKB" VALUE="$$request.serverKB">
- <% endif %>
- <% if exists( request.userName ) %>
- <INPUT TYPE=HIDDEN NAME="UserName" VALUE="$$request.userName">
- <% endif %>
- <% if exists( request.userPassword ) %>
- <INPUT TYPE=HIDDEN NAME="UserPassword" VALUE="$$request.userPassword">
- <% endif %>
- <% if exists( request.resultErrorTemplate ) %>
- <INPUT TYPE=HIDDEN NAME="ResultErrorTemplate"
- VALUE="$$request.resultErrorTemplate">
- <% endif %>
- <%-- GENERAL QUERY END --%>
- <%-- CLUSTERING BEGIN --%>
- <% if exists( request.clusterCount ) %>
- <INPUT TYPE=HIDDEN NAME="ClusterCount" VALUE="$$request.clusterCount">
- <% endif %>
- <% if exists( request.clusterKeywordCount ) %>
- <INPUT TYPE=HIDDEN NAME="ClusterKeywordCount"
- VALUE="$$request.clusterKeywordCount">
- <% endif %>
- <% if exists( request.clusterStyle ) %>
- <INPUT TYPE=HIDDEN NAME="ClusterStyle" VALUE="$$request.clusterStyle">
- <% endif %>
- <% if exists( request.clusterEffort ) %>
- <INPUT TYPE=HIDDEN NAME="ClusterEffort" VALUE="$$request.clusterEffort">
- <% endif %>
- <% if exists( request.clusterOrder ) %>
- <INPUT TYPE=HIDDEN NAME="clusterOrder" VALUE="$$request.clusterOrder">
- <% endif %>
- <% if exists( request.clusterPageSize ) %>
- <INPUT TYPE=HIDDEN NAME="ClusterPageSize" VALUE="$$request.clusterPageSize">
- <% endif %>
- <%-- CLUSTERING END --%>
- <%-- QBE BEGIN --%>
- <% if exists( request.qbeTermCount ) %>
- <INPUT TYPE=HIDDEN NAME="QBETermCount" VALUE="$$request.qbeTermCount">
- <% endif %>
- <%-- QBE END --%>
advsviep.hts, displays the full body of a document and provides navigation links.The document view templates are identical in how they work, basically only differing in the text string declaring to which theme they belong. These templates,
smplviep.hts, stndviep.hts, pwerviep.hts, advsviep.hts, and allviep.hts, have been separated by file name to make it easier for you to customize and maintain them by theme.The basic building block, used in all the document view templates, for displaying the full body of a document is:
- <BR>
- <% HTMLBodyPrint %>
- <BR>