我建立了一个搜索页,但是有点问题,请指教!
目的:就是搜索本地址的各种符合要求的页
效果:搜索结果要象新浪的搜索一样,只是范围局限在本域名内。
我的搜索程序是用的index server,但是上传后说数据局不支持index server,因为易受攻击。我想知道其他的搜索方法,请指教!
<%
Path = Request( "Path" )
Keyword = Request( "Keyword" )
if Keyword=Empty then Keyword="2000"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body bgcolor="#EBF8EC">
<%
set Q = Server.CreateObject("ixsso.Query")
set U = Server.CreateObject("ixsso.Util")
U.AddScopeToQuery Q, Path, "deep"
Q.Query = Keyword
Q.Columns = "DocTitle,Characterization,Rank,VPath,Write,Size"
set rs = Q.CreateRecordSet("nonsequential")
count=1
while Not rs.eof and count<=20
DocTitle=rs("DocTitle")
if DocTitle=Empty then DocTitle="无"
%>
<HR>
<BLOCKQUOTE>
<B><%=rs("DocTitle")%></B><BR>
<B>摘要:</B><%=rs("Characterization")%><BR>
<B>网址:</B><A HREF=<%=rs("vPath")%>><%=rs("vPath")%></A><BR>
<B>时间: </B><%=rs("Write")%><BR>
<B>大小: </B><%=rs("Size")%>
<P>
</BLOCKQUOTE>
<%rs.movenext
count=count+1
wend%>
<p>
<a href="Default1.asp">返回</a></p>
</body>
</html>