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
µÚÒ»¸ö²éѯÊDzétestµÄÕÒ³ötesting£¬Õâ¸ö²»Ì«Ã÷ÏÔ£»µÚ¶þ¸öÊÇÕҴʸùÊÇsingµÄÊý¾Ý£¬ÕÒµ½ÁËsangµÄÕâÒ»ÐÐÊý¾Ý¡£
Ïà¹ØÎĵµ£º
extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î» --segment management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......
--ʹÓÃ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
......
describe TABLE_NAME; --ÃèÊö
----------------------------------------------------------------
create table as select XXXXXX
insert into TABLE_NAME (reac_1,reac_2.....) values(v1,v2)
insert into TABLE_NAME (select * from ..........)
update TABLE_NAME set reac_1=v1,.............. ......
¡¾IT168 ¼¼ÊõÎĵµ¡¿Ëæ×ÅÍøÂçÓ¦Óú͵ç×ÓÉÌÎñµÄ²»¶Ï·¢Õ¹£¬¸÷¸öÕ¾µãµÄ·ÃÎÊÁ¿Ô½À´Ô½´ó£¬ÈçºÎʹÓÐÏ޵ļÆËã»úϵͳ×ÊԴΪ¸ü¶àµÄÓû§·þÎñ£¿ÈçºÎ±£Ö¤Óû§µÄÏìÓ¦ËٶȺͷþÎñÖÊÁ¿£¿ÕâЩÎÊÌâ¶¼ÊôÓÚ·þÎñÆ÷ÐÔÄÜÓÅ»¯µÄ·¶³ë¡£×÷Ϊ½Ï³É¹¦µÄÊý¾Ý¿â³§ÉÌ£¬Oracle¹«Ë¾Êý¾Ý¿âµÄÐÔÄÜÓÅ»¯ÊÇÈçºÎ½øÐеÄ
¡¡¡¡ ÓÅ»¯²ßÂÔ
¡¡¡¡ ΪÁ˱£Ö¤OracleÊý ......
½éÉÜÍêOracleÈ«ÎÄË÷ÒýµÄDATASTOREÊôÐÔ£¬¼ÌÐø½éÉÜOracleµÄFILTERÊôÐÔ¡£
OracleÈ«ÎÄË÷ÒýµÄFILTERÊôÐÔÖ÷ÒªÊÇÕë¶Ô¾ßÓÐÒ»¶¨¸ñʽµÄÎĵµ£¬Oracle¸ù¾ÝFILTERµÄÉ趨À´¹ýÂËÄÇЩ²»ÊôÓÚÎÄÕÂÄÚÈݵIJ¿·Ö¡£
FILTERÊôÐÔ°üº¬µÄÊôÐÔÓУºCHARSET_FILTER¡¢INSO_FILTER¡¢NULL_FILTER¡¢USER_FILTER¡¢PROCEDURE_FILTER¼¸ÖÖ¡£
ÕâÀïÈÔÈ»´ÓFILTER ......