views:

710

answers:

1

I have a set of Oracle tables that describe information about property owners. Owner names and other text values are stored in multiple fields in multiple related tables, for each owner. I would like to index the contents of these fields. My goal is to provide a single field where a user can enter keywords to locate owners.

How do I set up Oracle Text to accomplish this?

+3  A: 

You'll just need to create a multiple datastore preference and pass it in as a parameter to the index.

begin
ctx_ddl.create_preference('my_multi', 'MULTI_COLUMN_DATASTORE');
ctx_ddl.set_attribute('my_multi', 'columns', 'column1, column2, column3');
end;


create index myindex on mytable(docs) 
  indextype is ctxsys.context 
  parameters ('DATASTORE my_multi');

http://download.oracle.com/docs/cd/B19306_01/text.102/b14217/ind.htm#sthref281

Nick