当前位置:编程学习 > asp >>

index server example

<html><head>
<title>iskeyword.asp</title>
</head><body bgcolor="#FFFFFF">
<Form action = "iskeywordRespond.asp" method="get">
Choose The Word You Want to Search For::<p>
Search Word: <Input NAME="Keyword" size ="30"><br>
<Input type="submit" value="Find The Documents!">
</form>
</body></html>
The iskeywordrespond.asp looks like this:
<html><head>
<title>iskeywordrespond.asp</title>
</head>
<body>
<%
Set objQuery = Server.CreateObject("ixsso.query")
Set objUtil = Server.CreateObject("ixsso.util")
my_keyword=request("keyword")
objquery.catalog="learnasp"
' keyword search
myquery=myquery & "$contents " & my_keyword
' Exclude specific folders
%>
<!--#include virtual="/search/exclude.asp"-->
<%
' Exclude specific filenames
myquery=myquery & " and not #filename indexmaster.asp"
myquery=myquery & " and not #filename index.asp"
myquery=myquery & " and not #filename indexold.asp"
' Exclude specific extensions
myquery=myquery & " and not #filename *.|(txt|,inc|,htm|,mdb|,cnt|,class|,toc|,html|,css|)"
objQuery.Query=myQuery
objQuery.Columns = "Vpath, DocTitle, Filename, Characterization, Contents,DocKeyWords, Rank"
objQuery.SortBy = "Rank [d]"
objQuery.MaxRecords = 50
objUtil.AddScopeToQuery objQuery, "/", "DEEP"
linebr="<br>" & vbcrlf
Set rstemp = objQuery.CreateRecordSet("nonsequential")
        DO UNTIL rstemp.eof
        FOR EACH key in rstemp.fields
补充:asp教程,全文检索 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,