Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.1 KiB

  1. <% Response.Expires = 0 %>
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Test page 10 for IXSSO tests.</TITLE>
  5. <!--#include virtual="/IXSTest/prolog.inc"-->
  6. <!--#include virtual="/IXSTest/showqry1.inc"-->
  7. </HEAD>
  8. <BODY BGCOLOR=FFFFFF LINK=0000FF ALINK=00DDDD>
  9. <H2>Test 10 for IXSSO.</H2>
  10. <P>
  11. Test multi-scoped queries.
  12. </P>
  13. <%
  14. set Util=Server.CreateObject("IXSSO.Util")
  15. set Q=Server.CreateObject("IXSSO.Query")
  16. Q.Columns = "Filename, Rank, vpath, Size, Write"
  17. Q.Query = "#filename *.asp*"
  18. Q.SortBy = "rank[d]"
  19. Util.AddScopeToQuery Q, "/aspsamp", "SHALLOW"
  20. Q.OptimizeFor = "recall"
  21. Q.AllowEnumeration = TRUE
  22. Q.MaxRecords = 20000
  23. set RS=Q.CreateRecordSet( "nonsequential" )
  24. RecordCount1 = RS.RecordCount
  25. if RecordCount1 = 0 then
  26. Response.Write "no records returned from first query<BR>"
  27. end if
  28. RS.close
  29. Set RS = Nothing
  30. Q.Reset
  31. Q.Columns = "Filename, Rank, vpath, Size, Write"
  32. Q.Query = "#filename *.asp*"
  33. Q.SortBy = "rank[d]"
  34. Util.AddScopeToQuery Q, "/ixstest"
  35. Q.OptimizeFor = "recall"
  36. Q.AllowEnumeration = TRUE
  37. Q.MaxRecords = 20000
  38. set RS=Q.CreateRecordSet( "nonsequential" )
  39. RecordCount2 = RS.RecordCount
  40. if RecordCount2 = 0 then
  41. Response.Write "no records returned from second query<BR>"
  42. end if
  43. RS.close
  44. Set RS = Nothing
  45. Q.Reset
  46. Q.Columns = "Filename, Rank, vpath, Size, Write"
  47. Q.Query = "#filename *.asp*"
  48. Q.SortBy = "rank[d]"
  49. Util.AddScopeToQuery Q, "/aspsamp", "SHALLOW"
  50. Util.AddScopeToQuery Q, "/ixstest"
  51. Q.OptimizeFor = "recall"
  52. Q.AllowEnumeration = TRUE
  53. Q.MaxRecords = 40000
  54. set RS=Q.CreateRecordSet( "nonsequential" )
  55. RecordCount3 = RS.RecordCount
  56. if RecordCount3 <> RecordCount1+RecordCount2 then
  57. Response.Write "Error - third query is not union of first and second queries<BR>"
  58. end if
  59. RS.close
  60. Set RS = Nothing
  61. %>
  62. Record count 1 = <%= RecordCount1 & "<BR>"%>
  63. Record count 2 = <%= RecordCount2 & "<BR>"%>
  64. Record count 3 = <%= RecordCount3 & "<BR>"%>
  65. <BR>
  66. <BR>
  67. <TABLE><TR><TD>
  68. <!--#include virtual="/IXSTest/srcform.inc"-->
  69. </TD></TR></TABLE>
  70. <BR>
  71. </BODY>
  72. </HTML>