设为首页   加入最爱           最新更新:全方位英文文章资料库
 
资料坊搜索: 标题 全文     
index server example
   首页>>YesizeCOM>>电脑技能坊>>ASP>>正文       
 
广告招租,e-mail:yesize@hotmail.com

广告招租,e-mail:yesize@hotmail.com


<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
keyname=lcase(key.name)
SELECT CASE keyname
CASE vpath
response.write <a href=
response.write key
response.write > & key & </a> & linebr
CASE ELSE
response.write <b> & keyname & :</b> & linebr
response.write key & linebr
END SELECT
NEXT
response.write <br><hr>
? rstemp.movenext
LOOP
clean up
rstemp.close
set rstemp=nothing
Set objQuery = nothing
Set objUtil = nothing
%>
</body>
</html>
It has to exclude many folders on my site and the following file excludes directories:

<%
myquery=myquery & and not #Vpath = *\*_*
myquery=myquery & and not #Vpath = *\_contents*
myquery=myquery & and not #Vpath = *\_raw*

myquery=myquery & and not #Vpath = *\ads*
myquery=myquery & and not #Vpath = *\aspace*
myquery=myquery & and not #Vpath = *\advice\draft*
myquery=myquery & and not #Vpath = *\aspmagazine\new*
myquery=myquery & and not #Vpath = *\aspfuture*
myquery=myquery & and not #Vpath = *\asptraining*
myquery=myquery & and not #Vpath = *\aspynews*
myquery=myquery & and not #Vpath = *\activeserverpages*
myquery=myquery & and not #Vpath = *\contribute*
myquery=myquery & and not #Vpath = *\cst*
myquery=myquery & and not #Vpath = *\charlescarroll\draft*

myquery=myquery & and not #Vpath = *\dcline*
myquery=myquery & and not #Vpath = *\drafts*

myquery=myquery & and not #Vpath = *\experiments*

myquery=myquery & and not #Vpath = *\future*

myquery=myquery & and not #Vpath = *\home*
myquery=myquery & and not #Vpath = *\how*

myquery=myquery & and not #Vpath = *\images*

myquery=myquery & and not #Vpath = *\library*
myquery=myquery & and not #Vpath = *\learn\cover*

myquery=myquery & and not #Vpath = *\private*
myquery=myquery & and not #Vpath = *\perlscript*

myquery=myquery & and not #Vpath = *\reference*
myquery=myquery & and not #Vpath = *\redesign*

myquery=myquery & and not #Vpath = *\search*
myquery=myquery & and not #Vpath = *\searchasplists*
myquery=myquery & and not #Vpath = *\secret*
myquery=myquery & and not #Vpath = *\sites*
myquery=myquery & and not #Vpath = *\search*
myquery=myquery & and not #Vpath = *\speedsitelaws*
myquery=myquery & and not #Vpath = *\start*

myquery=myquery & and not #Vpath = *\trash*
myquery=myquery & and not #Vpath = *\test*

myquery=myquery & and not #Vpath = *\upload*
myquery=myquery & and not #Vpath = *\upload\tests*

myquery=myquery & and not #filename indexmaster.asp
myquery=myquery & and not #filename index.asp
myquery=myquery & and not #filename indexold.asp
myquery=myquery & and not #filename *.|(txt|,inc|,htm|,mdb|,cnt|,class|,toc|,html|,css|)
%>


上一篇:全文本检索的应用 下一篇:用asp怎样编写文档搜索页面

版权说明:作品来源于网上,版权归作者所有,如果无意中侵犯了您的版权,请来信告知,本站将在3个工作日内删除。yesize@hotmail.com
  热门小游戏分类 
射击小游戏 连连看小游戏
台球小游戏 成人小游戏
CS小游戏 化妆小游戏
赛车小游戏 休闲小游戏
篮球小游戏 换装小游戏
儿童小游戏 牛牛小游戏
麻将小游戏 冒险小游戏
美媚小游戏 益智小游戏
体育小游戏  
Society Recreation & Sports
Travel & Leisure Communications
Vehicles Computers
Fashion Arts & Entertainment
Reference & Education Disease & Illness
Writing & Speaking Politics
Product Reviews Food & Beverage
Finance Internet Business
Self Improvement Home & Family
Health & Fitness Business
最新更新内容
警惕“公务员报考热”背
公务员考试不是丈母娘考
一名新公务员的自白:我
公务员考脑筋急转弯与挂
北努斗:2006行政能力测
大讨论:06行测BT题目大
过来人回忆:当年,我也
一家之言:公务员热折射
公务员考试申论要是有正
数十万大学生走进公务员
      粤ICP备05005424         Copyright ©2000 - 2004 Yesize.COM