易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle全文索引之WORDLIST PREFERENCE

Oracle全文索引的WORDLIST属性用来设置模糊查询和同词根查询,另外WORDLIST属性还支持通配符查询。
Oracle的WORDLIST属性只有BASIC_WORDLIST一种,下面看一个BASIC_WORDLIST的例子:
1.Stemmer attribute是用来查询用词根的数据
SQL> create table stemmer_tbl(id number primary key,docs clob);
Table created.
SQL> insert into stemmer_tbl values(111,'We are testing the Stemmer attribute option');
1 row created.
SQL> insert into stemmer_tbl values(112,'The girl sang like a frog');
1 row created.
SQL> insert into stemmer_tbl values(113,'My import is committing too often');
1 row created.
SQL> commit;
Commit complete.
--
-- Basic WordList Stemmer attribute
-- This example uses English for Stemming.
-- Language choices are: NULL,ENGLISH,DERIVATIONAL,DUTCH,FRENCH,GERMAN,ITALIAN
-- and SPANISH. By default we use the language of the database. If the
-- database is not one of the listed languages then we choose NULL for stemmer
-- and default for fuzzy
--
SQL> begin
2 Ctx_Ddl.Create_Preference('STEMMER_PREF', 'BASIC_WORDLIST');
3 ctx_ddl.set_attribute('STEMMER_PREF','STEMMER','ENGLISH');
4 end;
5 /
PL/SQL procedure successfully completed.
SQL> create index stemmer_idx on stemmer_tbl ( docs )
2 indextype is ctxsys.context
3 parameters ('Wordlist STEMMER_PREF');
Index created.
SQL> column docs format a20
SQL> select id,docs,score(1) from stemmer_tbl
2 where contains ( docs, '$test',1 ) > 0;
ID DOCS SCORE(1)
---------- -------------------- ----------
111 We are testing the S 4
temmer attribute opt
ion
SQL> select id,docs,score(1) from stemmer_tbl
2 where contains ( docs, '$sing',1) >0;
ID DOCS SCORE(1)
---------- -------------------- ----------
112 The girl sang like a 4
frog
第一个查询是查test的找出testing,这个不太明显;第二个是找词根是sing的数据,找到了sang的这一行数据。


相关文档:

oracle 权限


--使用DBA创建两个用户
create user gubo identified by gubo;
create user gubo2 identified by gubo;
--给两个用户连接权限
grant create session to gubo;
grant create session to gubo2;
--给其中一个用户访问表空间的权限
grant unlimited tablespace to gubo; 
--连接其中用户,创建表
--conn gubo ......

Oracle 10g 特性: 通过备份实现可传输表空间

Oracle 10g 特性: 通过备份实现可传输表空间
Oracle8i 中引入的可传输表空间为实现更快的跨数据库数据传输提供了迫切需要的支持。使用此特性,您可以只导出表空间的元数据、传输数据文件并将转储文件导出到目标数据库主机以及导入元数据以将表空间“插入”到目标数据库中。该表空间中的数据在目标数据库中随即可 ......

Oracle问题汇总

遇到的一些Oracle的零碎问题:
1、使用自定义异常,raise_application_error(异常编号,异常信息)。
     A、异常编号注意不要超长,一般到5位
     B、异常信息是一个字符串信息
     C、配合存储过程中exception使用 ......

Oracle存储过程总结(一、基本应用)


1、创建存储过程
create or replace procedure test(var_name_1 in type,var_name_2 out type) as
--声明变量(变量名 变量类型)
begin
--存储过程的执行体
end test;
打印出输入的时间信息
E.g:
create or replace procedure test(workDate in Date) is
begin
dbms_output.putline('The input date i ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号