Set up Oracle Text to index values of multiple columns in Oracle tables
Asked Answered
D

1

7

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?

Dresser answered 21/2, 2009 at 0:21 Comment(0)
W
11

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

Wicklow answered 22/2, 2009 at 3:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.