分类: Oracle
2009-10-10 23:52:39
注:本文为转载,其中有些命令需视个人配置不同灵活变通!
我自己机器上有很多很有价值的文档(有自己写的,也有下载的),但是总是有时候想找一篇文档,当时不记得放在哪了。
机器上正好装了Ultra Search,我就在我的文档目录上创建一个搜索系统,以后找起文档来方便多了。(当然google desktop也是一个不错的工具,但是,它有一定局限性,比如不能针对某个目录搜索,没有高级搜索。关键是顺便还可以配置一下Ultra Search,增加经验值J)
以下是创建步骤(安装Ultra Search过程参见我的另外一篇文章《安装配置ultra search》):
创建一个数据库用户
Sqlplus “/as sysdba”
SQL> Create user demo identified by demo;
SQL> grant WKUSER to demo;
启动Ultra Search
Searchctl start
登录
User Name: WKSYS
Password: WKSYS
创建Instance
Admin->Instance->Create->Create Instance
内容如下:
New Instance Name: Demo_Inst
Database Schema: Demo
Schema Password: Demo
点击Apply
用demo登录
User Name: demo
Password: demo
选择demo_inst,点击Apply
配置crawler
Crawler->setting
内容如下:
Number of Crawler Threads: 20
Number of Processors: 1
Enable Language Detection: Yes
Default Language: Chinese
Crawling Depth: No Limit
Crawler Timeout Threshold (in seconds): 30
Default Character Set: GB2312-80 Simplified Chinese
Cache Directory Location (Absolute Path): ORA_HOME\ultrasearch\cache\ (ORA_HOME就是安装Oracle的目录)
Start Indexing Every: 5 megabytes
Clear Cache After Indexing: No
Level of Detail: Everything
Crawler Log File Directory:
C:\oracle\product\10.2.0\db_1\ultrasearch\log\
Crawler Log File Language: English
Database Connect String: [hostname]:[port]:[sid] (例如:localhost:1521:ORA10)
点击Apply
配置Sources
Sources->File->Create File Source
Name: Desk_files
Default Language: Chinese
点击Process to Step 2
在输入框中填入你的文档路径,比如file:///C:/Documents
点击ADD
点击Process to Step 3
这一步中的内容不用填
点击Process to Step 4
选择文档类型,将你文档目录下需要搜索的文档的类型选中,
点击Process to Step 5
Use file display URL
File URL Prefix: file:///
Display URL Prefix: file:///
点击NEXT
点击NEXT
点击FINISH
配置Schedules
Schedules->Create New Schedule
Name: Desk_file_sche
点击NEXT
Frequency Type: Daily
Time Between Launches (days): 1
Schedule Launching Time: 1:00 AM
Automatically Accept All URLs for Indexing
Select a Crawler Host: Database Host
点击Process to Step 3
Get Available Sources for Type: File
点击Get Sources
选择Desk_files到右边列表
点击Finish
同步索引
选择Schedules页
找到刚才创建的schedule项:Every day at 01:00 o'clock
点击status列中的Scheduled
点击Execute Immediately
不断点击Refresh Status,直到status为Scheduled.
配置完毕
打开网页:就可以搜索你的文档了