7

我有一组描述业主信息的 Oracle 表。对于每个所有者,所有者名称和其他文本值存储在多个相关表的多个字段中。我想索引这些字段的内容。我的目标是提供一个字段,用户可以在其中输入关键字来定位所有者。

如何设置 Oracle Text 来完成此任务?

4

1 回答 1

11

您只需要创建一个多数据存储首选项并将其作为参数传递给索引。

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

于 2009-02-22T03:08:33.910 回答