设为首页 | 加入收藏 | 联系站长
Google
 | 星际争霸 | 星际争霸II | 暗黑破坏神
 | 魔兽争霸 | 英雄无敌  
 您现在的位置: 好技术学习网 >> 技术文章 >> ASP技术 >> ASP技术应用 >> 文章正文
相 关 文 章
ASP-MySQL数据库系统的安装…
ASP连接数据库
ASP设计常见问题及解答精要…
ASP设计常见问题及解答精要…
Form域中用Post提交容量大的…
ASP中使用组件搜索
解决在ASP中执行数据库查询…
维护ASP应用程序的安全
用ASP打开远端MDB文件
ASP中如何在网页上输入中文…
最 新 热 门
最 新 推 荐
精 彩 游 戏
移动能力强,防御强大,任何地方都可以建筑,隐形,多样性,船舶,科技树…
[星际补丁]1.14·1.13f·1.08b
[星际2]酷图 [星际2]人族视频
[人类]大法师  [兽族]暗影猎手
[精灵]恶魔猎手 [不死]死亡骑士
[资讯]魔兽资讯 [图库]魔兽酷图
[下载]魔兽下载 [壁纸]精美壁纸
暗黑破坏神入门 暗黑破坏神指引
[Hero5]宝物一览   英雄无敌
当前时间是:
活用Index server SSO组件(企业内网搜索引型)
作者:未知 来源:本站收集 时间:2006-10-24 12:45:57 『 字号:  』

1, 到 管理工具 ---> 服务 ---> Indexing Service 组件 (激活并设置自动)

2. 在wwwboot 根目录 建立 search.asp

3.在IIS 运行 search.asp 完成

search.asp

<script language="vbscript" RunAt="Server">
Dim SearchScope,LocaleID,QryStr
Dim ASPFile,NewQuery,UsedQuery
Dim PageSize
Dim NextPgNo,NextRecNo,CurrentPage
Dim ActiveQuery
Dim Rs,Q,util
Sub Initialize()
SearchScope="/"
LocaleID="ZH-CN"
PageSize=20
NewQuery=FALSE
UsedQuery=False
QryStr=""
ASPFile=Request.ServerVariables("PATH_INFO")
ENd sub

Sub Judge_Method()
if Request.ServerVariables("REQUEST_METHOD")="POST" then
QryStr=Request.Form("QryStr")
if Request.Form("Action")="执行" then
NewQuery=True
end if
end if
if Request.ServerVariables("REQUEST_METHOD")="GET" then
QryStr=Request.QueryString("qu")
SearchScope=Request.QueryString("sc")
if Request.QueryString("pg")<>"" then
NextPgNo=Request.QueryString("pg")
NewQuery=false
UsedQuery=true
else
NewQuery=QryStr<>""
end if
end if
end sub

sub Show_Mainform()
Response.write "<font size=+3><b>全文数据检索系统</b></font>"
Response.write "<Form action='"& ASPFile &"' METHOD=Post>"
Response.write "请输入查询的字符串:"
Response.write "<input type='text' name='QryStr' Size=46 MAXLENGTH=100 VALUE='"&QryStr&"'>"
Response.write "&nbsp;<input type='submit' name='Action' value='执行'>"
Response.write "&nbsp;<input type='reset' name='Cleat' value='清除'>"
Response.write "<ht></form>"
end sub

sub Init_ixsso()
Dim StrLen
if NewQuery then
Set Session("Query")=Nothing
Set Session("Recordset")=Nothing
NextRecNo=1
strLen=len(QryStr)
if left(QryStr,1)=chr(34) then
StrLen=Strlen-1
Qrystr=right(QryStr,StrLen)
end if
if right(QryStr,1)=chr(34) then
StrLen=StrLen-1
Qrystr=Left(QryStr,StrLen)
end if
Set Q=server.createobject("ixsso.Query")
set util=Server.Createobject("ixsso.Util")
Q.Query=QryStr
Q.SortBy="rank[d]"
Q.Columns="DocTitle,vpath,filename,size,write,characterization,rank"
Q.MaxRecords=3000
if SearchScope <>"/" then
util.AddScopeToQuery Q,SearchScope,"deep"
end if
if LocaleID<>"" then
Q.LocaleID=util.ISOToLocaleID(LocaleID)
end if
set Rs=Q.CreateRecordSet("nonsequential")
Rs.pagesize=PageSize
ActiveQuery=true
else UsedQuery=true
if Isobject(Session("Query")) and IsObject(Session("RecordSet")) then
set Q=Session("Query")
set RS=Session("RecordSet")
if Rs.RecordCount<>-1 and NextPgNo <>-1 then
Rs.AbsolutePage=NextPgNo
NextRecNo=Rs.AbsolutePosition
end if
ActiveQuery=true
else
Response.write "错误 - 尚无任何查询条件!"
end if
end if
End Sub

Sub show_Query()
Dim LastRecordOnPage
if ActiveQuery then
if not Rs.Eof then
LastRecordOnPage=NextRecNo+Rs.PageSize - 1
CurrentPage=Rs.Absolut

[1] [2] [3] 下一页

  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【打印本文】【关闭窗口

    网站公告 | 关于本站 | 联系站长 | 设为首页 | 加入收藏 | 友情链接 | 版权申明 | 广告服务 | 网站地图 | 访客留言

    Copyright ©
    建议使用1024*768分辨率及第三方浏览器对本站进行浏览
    | |
    本站大部分信息资源来源于网络,仅供学习|研究|探讨|收藏之用,版权归原作者所有!