教程中国
PHOTOSHOP CS9.0中文版 MAYA 8.5 FOR WINDOWS Corel Painter v9.0 Flash MX2004 中文版 Illustrator cs2 中文版
VC++6.0含sp6 中英文版 VB6.0 +sp6 简体中文版 Borland Delphi 7汉化版 MSDN for vb6.0中文版 Visual Studio 2005简体
教程中国下属 文件存储共享专家BIBIDU.COM 提供大型软件,教材,源码,电影,音乐,图书等下载 更多精品请点此进入
  您目前所在位置: 教程中国 >> 编程基地 >> ASP >> index server example RSS订阅
index server example
教程(视频,书籍)下载:  ASP.NET AutoCAD 数据库 C# ASP java photoshop 网页设计 delphi 3dmax Flash C++ VB 张孝祥 实例   更多请进入BIBIDU搜索
IT搜索引擎   
<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|)"
%>



来源:upschool.com.cn
作者:
关键字:index,server,example
发表日期:2005-11-19

网页显示有限 阅读全文请下载本文完整版WORD文档

上一篇:Windows 2000 Server 下 Indexing Service 编程实例。   下一篇:全文本检索的应用(三)


2009-1-8 23:27:44
本文的相类似文章
  • VB 列出SQL SERVER数据库中所有表及字段信息
  • 【小技巧】 让你的VRServer随3ds Max同时运行吧!
  • 用ASP批量更新SQL SERVER数据.
  • asp对SQL Server 数据库的备份与恢复(实例)
  • Oracle和SQL Server浅析
  • SQL Server和Oracle的常用函数对比
  • Index of Oracle
  • Oracle和SQL Server存储调试和出错处理
  • Oracle webserver中文介绍-第四章
  • Oracle webserver中文介绍-第三章
  • 在学习中进步 在进步中成长 教程中国相随您的成长之路
    华腾联合科技股份有限公司版权所有
    广告联系:Rosibo@163.com