Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> MULTI_COLUMN_DATASTORE issue

MULTI_COLUMN_DATASTORE issue

From: Venkat Tipparam <tipparam_at_yahoo.com>
Date: 29 Jul 2003 08:30:26 -0700
Message-ID: <6d37ce5.0307290730.2b47418e@posting.google.com>


I am using Oracle Text's multi_column_datastore to create a compound text index on group of columns. It seems to work fine however when I search for one of the column names in the index it matches all rows. Please see the script below.

The following example uses multi_column_datastore but creates index on just one column for the demo purpose.

you will have to grant execute permission on ctx_ddl to user scott to run the script.

connect ctxsys/ctxsys;

begin
ctx_ddl.drop_preference('TEST_MULTI_PREF'); end;
/

begin
ctx_ddl.create_preference('TEST_MULTI_PREF', 'MULTI_COLUMN_DATASTORE');
ctx_ddl.set_attribute('TEST_MULTI_PREF', 'COLUMNS', 'TEXT'); end;
/

connect scott/tiger;

drop table ctx_test1;

create table ctx_test1 (

	id	number primary key,
	text	varchar2(4000),
	dummy	char(1)

);

create index ctx_test1_idx1 on ctx_test1(dummy) indextype is ctxsys.context parameters ('datastore CTXSYS.TEST_MULTI_PREF');

insert into ctx_test1(id,text) values (100, 'first line');
insert into ctx_test1(id,text) values (101, 'second line');
insert into ctx_test1(id,text) values (102, 'third line');
insert into ctx_test1(id,text) values (103, 'fourth line');
insert into ctx_test1(id,text) values (104, 'fifth line');

commit;

begin

        ctx_ddl.sync_index('CTX_TEST1_IDX1');
end;
/

select text from ctx_test1 where contains(dummy, 'text') > 0;

Thanks in advance,

Venkat Tipparam Received on Tue Jul 29 2003 - 10:30:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US