|
Re: Searching word document in oracle [message #103233 is a reply to message #103076] |
Thu, 13 March 2003 02:56 |
I meet the same problem:s
Messages: 1 Registered: March 2003
|
Junior Member |
|
|
Environment: Window2k,Oracle9i
database charset:zhs16GBK
--create a table with blob column
begin
CREATE TABLE IDEAL_OA.quick
(
quick_id NUMBER,
text VARCHAR2(80),
clobtext CLOB,
blobtext BLOB,
CONSTRAINT PK_quick PRIMARY KEY (quick_id )
);
end;
--input data
begin
insert into ideal_oa.quick ( quick_id, text )
values ( 1, 'hello world' );
update ideal_oa.quick set clobtext='How are you?';
update ideal_oa.quick set blobtext=EMPTY_BLOB();
commit;
end;
--input to blob column with binary file,including .txt,.doc
-- create preference
begin
Ctx_Ddl.Create_Preference ('CHINESE_LEXER_pref','CHINESE_LEXER');
Ctx_Ddl.Create_Preference ('inso_filter_pref','inso_filter');
end;
--create index
begin
create INDEX ideal_oa.INDEX_QUICK ON ideal_oa.QUICK(TEXT) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('lexer CHINESE_LEXER_pref');
create INDEX ideal_oa.INDEX_QUICK_clobtext ON ideal_oa.QUICK(clobtext) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('lexer CHINESE_LEXER_pref');
create INDEX ideal_oa.INDEX_QUICK_blobtext ON ideal_oa.QUICK(blobtext) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('lexer CHINESE_LEXER_pref filter inso_filter_pref');
end;
--search
select quick_id from ideal_oa.quick where contains(clobtext,'how are')> 0;--clob type sucesses!!
select quick_id from ideal_oa.quick where contains(blobtext,'the world')> 0;
--when executing above,I encountered no error.
--searching successes on clob,however no rows returned on blob.
What's the error????
|
|
|
|
|