Home » Other » General » Searching word document in oracle
Searching word document in oracle [message #103076] Mon, 27 January 2003 11:46 Go to next message
Pedro Neto
Messages: 1
Registered: January 2003
Junior Member
I'm needing to search phrases in a word document stored at oracle database as a BLOB object. There is something to do help this task?
Re: Searching word document in oracle [message #103233 is a reply to message #103076] Thu, 13 March 2003 02:56 Go to previous messageGo to next message
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????
Re: Searching word document in oracle [message #103625 is a reply to message #103233] Mon, 02 February 2004 21:48 Go to previous messageGo to next message
Povilas Serepinas
Messages: 1
Registered: February 2004
Junior Member
I got this problem too... In oracle documentation I found, that you can create index on blob and search its entry data, but I can't... no results is returned.

Can help anyone? ;]]
Re: Searching word document in oracle [message #103983 is a reply to message #103625] Tue, 15 June 2004 12:07 Go to previous message
Daniel Travin
Messages: 1
Registered: June 2004
Junior Member
!! I have excatly the same problem.
contains find a string in CLOB but does not work with BLOB

oracle 9.2.0
Previous Topic: Oracle/PHP
Next Topic: Oracle Cert Professional
Goto Forum:
  


Current Time: Sat Dec 28 14:04:51 CST 2024