% DebugFlag = FALSE NewQuery = FALSE UseSavedQuery = FALSE SearchString = "" if Request.ServerVariables("REQUEST_METHOD") = "POST" then SearchString = Request.Form("SearchString") SortBy = Request.Form("SortBy") Colset = Request.Form("ColChoice") Scope = Request.Form("Scope") ' NOTE: this will be true only if the button is actually pushed. if Request.Form("Action") = "New Query" then NewQuery = TRUE end if end if if Request.ServerVariables("REQUEST_METHOD") = "GET" then SearchString = Request.QueryString("qu") SortBy = Request.QueryString("so") Colset = Request.QueryString("co") Scope = Request.QueryString("ix") if Request.QueryString("pg") <> "" then NextPageNumber = Request.QueryString("pg") NewQuery = FALSE UseSavedQuery = TRUE else NewQuery = SearchString <> "" end if end if %>
Index ServerSample Query |
SearchString = <%=SearchString%> SortBy = <%=SortBy%> Colset = <%=Colset%> Scope = <%=Scope%> NewQuery = <%=CStr(NewQuery)%> UseSavedQuery = <%=CStr(UseSavedQuery)%><%end if%> <% if NewQuery then set Session("Query") = nothing set Session("Recordset") = nothing NextRecordNumber = 1 set Q = Server.CreateObject("ixsso.Query") set Util = Server.CreateObject("ixsso.Util") Q.Query = SearchString Q.SortBy = SortBy Util.AddScopeToQuery Q, Scope, "DEEP" if ColSet = 1 then Q.Columns = "filename, vpath, size, write" RecordsPerPage = 25 elseif ColSet = 2 then Q.Columns = "vpath" RecordsPerPage = 200 elseif ColSet = 2 then Q.Columns = "DocTitle, vpath, path, filename, size, write, characterization" RecordsPerPage = 10 end if set RS = Q.CreateRecordSet("nonsequential") RS.PageSize = RecordsPerPage 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) & ".
" %>
Record | File name | Path | Size | Write |
<%=NextRecordNumber %>. | <%=RS("FileName")%> | "><%=RS("vpath")%> | <%=RS("Size")%> | <%=RS("Write")%> |
<%
else ' NOT RS.EOF
if NextRecordNumber = 1 then
Response.Write "No documents matched the query
" else Response.Write "No more documents in the query
" end if end if ' NOT RS.EOF %> <%if Q.OutOfDate then%>
The index is out of date.
<%end if%>
<%if Q.QueryIncomplete then%>
The query is too expensive to complete.
<%end if%>
<%if Q.QueryTimedOut then%>
The query took too long to complete.
<%end if%>
<%SaveQuery = TRUE%> <%end if%> <%if Not RS.EOF then%> | <%SaveQuery = TRUE%> <%end if%> <%' if DebugFlag then%> | <%' end if%> |
Best experienced with
Click here to start. |