|
| |||||||||||
![]()
|
|
Note: To search for two or more keywords at once, use the AND joiner to find pages with references to all of the keyword or use the OR joiner to find pages with any of the keywords . For more help, click the Tips for Searching link below. <% on error resume next ' ' *** Modifying the Form's Search Scope. ' ' The form will search from the root of your web server's namespace and below ' (deep from "/" ). To search a subset of your server, for example, maybe just ' a PressReleases directory, modify the scope variable below to list the virtual path to ' search. The search will start at the directory you specify and include all sub- ' directories. FormScope = "/" ' ' *** Modifying the Number of Returned Query Results. ' ' You can set the number of query results returned on a single page ' using the variable below. PageSize = 10 ' ' *** Setting the Locale. ' ' The following line sets the locale used for queries. In most cases, this ' should match the locale of the server. You can set the locale below. SiteLocale = "EN-US" ' ********** END QUICK CUSTOMIZATION SECTIONS *********** ' Set Initial Conditions NewQuery = FALSE UseSavedQuery = FALSE SearchString = "" QueryForm = Request.ServerVariables("PATH_INFO") ' Did the user press a SUBMIT button to execute the form? If so get the form variables. if Request.ServerVariables("REQUEST_METHOD") = "POST" then SearchString = Request.Form("SearchString") FreeText = Request.Form("FreeText") ' NOTE: this will be true only if the button is actually pushed. if request.form("SearchString") <> " " then NewQuery = TRUE RankBase=1000 end if end if if Request.ServerVariables("REQUEST_METHOD") = "GET" then SearchString = Request.QueryString("qu") FreeText = Request.QueryString("FreeText") FormScope = Request.QueryString("sc") RankBase = Request.QueryString("RankBase") if Request.QueryString("pg") <> "" then NextPageNumber = Request.QueryString("pg") NewQuery = FALSE UseSavedQuery = TRUE else NewQuery = SearchString <> "" end if end if %>
<% if NewQuery then set Session("Query") = nothing set Session("Recordset") = nothing NextRecordNumber = 1 ' Remove any leading and ending quotes from SearchString SrchStrLen = len(SearchString) if left(SearchString, 1) = chr(34) then SrchStrLen = SrchStrLen-1 SearchString = right(SearchString, SrchStrLen) end if if right(SearchString, 1) = chr(34) then SrchStrLen = SrchStrLen-1 SearchString = left(SearchString, SrchStrLen) end if if FreeText = "on" then CompSearch = "$contents " & chr(34) & SearchString & chr(34) else CompSearch = SearchString end if If Request.Form("SearchString") = "" Then CompSearch = "trsa" SearchString = "trsa" End If CompSearch = CompSearch & " and not #path *\_vti_* and not #path *admin*" set Q = Server.CreateObject("ixsso.Query") set util = Server.CreateObject("ixsso.Util") Q.Catalog = "TRSA" Q.Query = CompSearch Q.SortBy = "rank[d]" Q.Columns = "DocTitle, filename, size, path, write, characterization, rank" ' Response.Write(Q.Columns 'Q.MaxRecords = 300 if FormScope <> "/" then util.AddScopeToQuery Q, FormScope, "deep" end if if SiteLocale<>"" then Q.LocaleID = util.ISOToLocaleID(SiteLocale) end if set RS = Q.CreateRecordSet("nonsequential") Call ErrorVBScriptReport("Error while creating recordset") RS.PageSize = PageSize ActiveQuery = TRUE elseif UseSavedQuery then if IsObject( Session("Query") ) And IsObject( Session("RecordSet") ) then set Q = Session("Query") set RS = Session("RecordSet") if RS.RecordCount <> -1 and NextPageNumber <> -1 then RS.AbsolutePage = NextPageNumber NextRecordNumber = RS.AbsolutePosition end if ActiveQuery = TRUE else Response.Write "ERROR - No saved query" end if end if if ActiveQuery then if not RS.EOF then LastRecordOnPage = NextRecordNumber + RS.PageSize - 1 CurrentPage = RS.AbsolutePage if RS.RecordCount <> -1 AND RS.RecordCount < LastRecordOnPage then LastRecordOnPage = RS.RecordCount end if Response.Write "Documents " & NextRecordNumber & " to " & LastRecordOnPage if RS.RecordCount <> -1 then Response.Write " of " & RS.RecordCount end if Response.Write " matching the query " & chr(34) & "" Response.Write SearchString & "" & chr(34) & ". " %> <% if Not RS.EOF and NextRecordNumber <= LastRecordOnPage then%>
" else Response.Write "No more documents in the query " end if end if ' NOT RS.EOF if NOT Q.OutOfDate then ' If the index is current, display the fact %>
The index is up to date.
The query is too expensive to complete.
The query took too long to complete.
©1996-99 TRSA, 1130 E. Beach Blvd. Suite B, Hallandale, Florida, 33009. All Rights Reserved. | |||||||||