Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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
µÚÒ»¸ö²éѯÊDzétestµÄÕÒ³ötesting£¬Õâ¸ö²»Ì«Ã÷ÏÔ£»µÚ¶þ¸öÊÇÕҴʸùÊÇsingµÄÊý¾Ý£¬ÕÒµ½ÁËsangµÄÕâÒ»ÐÐÊý¾Ý¡£


Ïà¹ØÎĵµ£º

Oracle±í¿Õ¼ä¹ÜÀí

extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î»      --segment    management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......

OracleÎÊÌâ»ã×Ü

Óöµ½µÄһЩOracleµÄÁãËéÎÊÌ⣺
1¡¢Ê¹ÓÃ×Ô¶¨ÒåÒì³££¬raise_application_error(Òì³£±àºÅ£¬Òì³£ÐÅÏ¢)¡£
     A¡¢Òì³£±àºÅ×¢Òâ²»Òª³¬³¤£¬Ò»°ãµ½5λ
     B¡¢Òì³£ÐÅÏ¢ÊÇÒ»¸ö×Ö·û´®ÐÅÏ¢
     C¡¢ÅäºÏ´æ´¢¹ý³ÌÖÐexceptionʹÓà ......

Oracle´´½¨Êý¾Ý¿âͬÒå´Ê

1.ÔÚAÓû§ÏÂÊÚȨ“ÉÌ»§ÐÅÏ¢±í”¸øBÓû§
grant all on TBL_INF_MCHNT_INF to B;
commit;
2.ÔÚBÓû§Ï½¨Á¢Í¬Òå´Ê
create synonym TBL_INF_MCHNT_INF for A.TBL_INF_MCHNT_INF;
3. ²éѯÊý¾Ý¿âËùÓÐͬÒå´Êselect * from sys.synonyms ......

ÔÚoracleÀûÓÃÓαêÈ¡Êý¾Ý¿âµÄ½á¹û¼¯Ó¦ÓÃʵÀý£º

SQL> create table test2(s1 varchar(10),s2 varchar2(10));
±íÒÑ´´½¨¡£
SQL> insert into test2 values('11','111');
ÒÑ´´½¨ 1 ÐС£
SQL> insert into test2 values('22','222');
ÒÑ´´½¨ 1 ÐС£
SQL> CREATE OR REPLACE PACKAGE test222 AS
2 TYPE t_cursor IS REF CURSOR;
3 procedure p_tes ......

oracleÈ«ÎÄË÷ÒýÖ®LEXER


½éÉÜÍêOracleÈ«ÎÄË÷ÒýµÄFILTERÊôÐÔ£¬¼ÌÐø½éÉÜOracleµÄLEXERÊôÐÔ¡£

OracleÈ«ÎÄË÷ÒýµÄLEXERÊôÐÔÓÃÓÚ´¦Àí¸÷ÖÖ²»Í¬µÄÓïÑÔ¡£×î»ù±¾µÄÓ¢ÎÄʹÓÃBASE_FILTER£¬¶øÈç¹ûÐèҪʹÓÃÖÐÎÄÔò¿ÉÒÔʹÓÃCHINESE_VGRAM_LEXER»òCHINESE_LEXER¡£
ÕâƪÎÄÕ¼òµ¥ËµÃ÷BASIC_LEXERÊôÐÔ¡£BASIC_LEXERÊôÐÔÖ§³Ö¶àÖÖÓïÑÔ£¬±ÈÈçÓ¢Óï¡¢µÂÓï¡¢ºÉÀ¼ÓŲ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ