设置 Oracle Text 以索引 Oracle 表中多列的值
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/571758/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Set up Oracle Text to index values of multiple columns in Oracle tables
提问by JoshL
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.
我有一组描述有关业主信息的 Oracle 表。对于每个所有者,所有者名称和其他文本值存储在多个相关表的多个字段中。我想索引这些字段的内容。我的目标是提供一个字段,用户可以在其中输入关键字来定位所有者。
How do I set up Oracle Text to accomplish this?
如何设置 Oracle Text 来完成此操作?
回答by Nick
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
http://download.oracle.com/docs/cd/B19306_01/text.102/b14217/ind.htm#sthref281