<% 'Insure that the user enters a search string otherwise redirect to an error page If Request.Form("NewQuery") = "TRUE" and Request.Form("SearchString")= "" then Response.Redirect("error.html") End If 'If the request is a new query then set initial variables and set up the query object If Request.Form("NewQuery") = "TRUE" then NewQuery = TRUE RankBase = 1000 SearchString = Request.Form("SearchString") CurrentPage = 1 Else NewQuery = FALSE End If 'If the request is a continuation of an existing query then read in existing variables If Request.Form("SavedQuery") = "TRUE" then SavedQuery = TRUE RankBase = cint(Request.Form("RankBase")) SearchString = Request.Form("SearchString") CurrentPage = cint(Request.Form("CurrentPage")) Else SavedQuery = FALSE End If If NewQuery = TRUE or SavedQuery = TRUE then 'Set initial query parameters Catalog = "Renewal" SortBy = "rank[d]" Columns = "doctitle, vpath, filename, size, write, characterization, rank" AllowEnumeration = FALSE SiteLocale = "EN-US" MaxRecords = 300 OptimizeFor = "recall" PageSize = 10 FormScope = "/" FormDepth = "deep" RecordSetType = "nonsequential" 'Remove any quotes from the search string SearchString = Replace(SearchString, chr(34), "") End If 'If the request is a new query then instantiate the query object If NewQuery = TRUE then set Q = Server.CreateObject("IXSSO.Query") set util = Server.CreateObject("IXSSO.Util") Q.Catalog = Catalog Q.Query = "(! #vpath *_\vti_*.) and (@doctitle > " + chr(34) + chr(34) + ") and (@filename > " + chr(34) + chr(34) + ") and (" + SearchString + ")" Q.SortBy = SortBy Q.Columns = Columns Q.AllowEnumeration = AllowEnumeration If SiteLocale <> "" then Q.LocaleID = util.ISOToLocaleID(SiteLocale) End If Q.MaxRecords = MaxRecords Q.OptimizeFor = OptimizeFor If FormScope <> "/" then util.AddScopeToQuery Q, FormScope, FormDepth End If End If 'If the request is a continuation of an existing query then read in the query object from session variables If SavedQuery = TRUE then If isObject(Session("Query")) and IsObject(Session("RecordSet")) and isObject(Session("util")) then set Q = Session("Query") set util = Session("util") set RS = Session("RecordSet") RS.AbsolutePage = CurrentPage Else Response.Write("ERROR - No saved query.") End If End If Function ShowResults() On Error Resume Next 'Run the query set RS=Q.CreateRecordSet(RecordSetType) RS.PageSize = PageSize 'If the query fails display an error otherwise display the results If RS.EOF then If Q.QueryIncomplete then Response.Write("The query is too expensive to complete." + chr(13)) ElseIf Q.QueryTimedOut then Response.Write("The query took too long to complete." + chr(13)) Else Response.Write("No documents matched the query." + chr(13)) End If Else 'Dynamicly build a results list in table format Response.Write("" + chr(13)) LastRecordOnPage = PageSize * CurrentPage FirstRecordOnPage = ((CurrentPage - 1) * PageSize) + 1 If RS.RecordCount <> -1 and RS.RecordCount < LastRecordOnPage then LastRecordOnPage = RS.RecordCount End If 'List the number of documents found Response.Write("Documents " + cstr(FirstRecordOnPage) + " to ") Response.Write(cstr(LastRecordOnPage) + " of " + cstr(RS.RecordCount)) Response.Write(" matching the query " + chr(34) + "") Response.Write(SearchString + "" + chr(34) + chr(13)) Do While Not RS.EOF and RS.AbsolutePosition <= PageSize * CurrentPage 'Set the initial rank variable If RS.AbsolutePosition = 1 then RankBase = RS("rank") End If 'Insure that the rank is between 1 and 1000 If RankBase > 1000 then RankBase = 1000 ElseIf RankBase < 1 then RankBase = 1 End If NormRank = RS("rank") / RankBase 'Assign a rank image to each record If NormRank > 0.80 then stars = "images/rankbtn5.gif" ElseIf NormRank > 0.60 then stars = "images/rankbtn4.gif" ElseIf NormRank > 0.40 then stars = "images/rankbtn3.gif" ElseIf NormRank > 0.20 then stars = "images/rankbtn2.gif" Else stars = "images/rankbtn1.gif" End If Response.Write("" + chr(13)) Response.Write("" + chr(13)) If VarType(RS("doctitle")) = 1 or RS("doctitle") = "" then Response.Write("" + chr(13)) RS.MoveNext Loop Response.Write("
" + cstr(RS.AbsolutePosition - RecordOffset) + chr(13)) Response.Write(" " + cstr(RS("filename")) + "
" + chr(13)) Else Response.Write("
" + cstr(RS("doctitle")) + "
" + chr(13)) End If If VarType(RS("characterization")) = 8 and RS("characterization") <> "" then Response.Write("Abstract: " + Server.HTMLEncode(RS("characterization")) + "
" + chr(13)) End If Response.Write("http://" + Request("server_name") + cstr(RS("vpath")) + "
" + chr(13)) If RS("size") = "" then Response.Write("(size and time unknown)") Else Response.Write("size " + cstr(RS("size")) + " bytes - " + cstr(RS("write")) + " GMT" + chr(13)) End If Response.Write("


" + chr(13)) Response.Write("
" + chr(13)) 'Indicate whether the index is up to date If NOT Q.OutofDate then Response.Write("The index is up to date.
" + chr(13)) Else Response.Write("The index is not up to date.
" + chr(13)) End If 'Display page buttons if needed and save the query If RS.PageCount > 1 then Response.Write("
" + chr(13)) Response.Write("" + chr(13)) Response.Write("" + chr(13)) Response.Write("" + chr(13)) Response.Write("Page: " + chr(13)) For intloop = 1 to RS.PageCount If intloop <> CurrentPage then Response.Write("" + chr(13)) End If Next Response.Write("
" + chr(13)) set Session("Query") = Q set Session("util") = util set Session("RecordSet") = RS Else 'If there is only one page of results close the query RS.close set RS = Nothing set util = Nothing set Q = Nothing set Session("RecordSet") = Nothing set Session("util") = Nothing set Session("Query") = Nothing End If End If End Function %> Site Search


aboutaboutcalendarcontact ussearch
 
Tips for Searching

At its simplest, a query can be just a word or a phrase. But with the tips on this page, you can expand the focus of your query to give you more complete results. These tips will get you started with basic query language and acquaint you with the full power of Microsoft Index Server.

  • Look for words with the same prefix. For example, in your query form type key* to find key, keying, keyhole, keyboard, and so on.

  • Search for all forms of a word. For example, in the form type sink** to find sink, sinking, sank, and sunk.

  • Search with the keyword NEAR, rather than AND, for words close to each other. For example, both of these queries, system and manager and system near manager, look for the words system and manager on the same page. But with NEAR, the returned pages are ranked in order of proximity: The closer together the words are, the higher the rank of that page.

  • Refine your queries with the AND NOT keywords to exclude certain text from your search. For example, if you want to find all instances of surfing but not the Net, write the following query:

    surfing AND NOT the Net

  • Add the OR keyword to find all instances of either one word or another, for example:

    Abbott OR Costello

    This query finds all pages that mention Abbott or Costello or both.

  • Put quotation marks around keywords if you want Index Server to take them literally. For instance, if you type the following query:

    "system near manager"

    Index Server will literally look for the complete phrase system near manager. But if you type the same query without the quotation marks:

    system near manager

    Index Server searches all documents for the words system and manager.

 

The intent of this website is not to provide medical advice. We encourage you to seek any necessary health care based on your own individual needs to maximize wellness of your whole being. WCRC's mission is to provide a forum for discussion. © Copyright Women's Cancer Resource Center 2003. All rights reserved.