Multi-column index setup question [message #234447] |
Tue, 01 May 2007 11:32 |
gerrywhite
Messages: 3 Registered: April 2007 Location: Maryland
|
Junior Member |
|
|
First of all, this forum has been a great source of answers for my dive into Oracle Text. Thanks, all!
Here is my noob question:
First, I'm trying to create an index for a multi-column search.
I've created the MULTI_COLUMN_DATASTORE using the standard CTX_DDL code as shown below:
begin
ctx_ddl.create_preference('test_multi',MULTI_COLUMN_DATASTORE');
ctx_ddl.set_attribute('test_multi','columns','col1,col2');
ctx_ddl.set_attribute('test_multi','filter','N,Y');
end;
NOTE: col1 is VARCHAR2 and col2 is BLOB containing docs
And I've run code for my BASIC_LEXER and BASIC_STORAGE requirements.
Here is the CREATE INDEX statement I tried to use:
CREATE INDEX test_idx ON legacy_objects(col1,col2)
INDEXTYPE IS ctxsys.context
PARAMETERS('
DATASTORE test_multi
LEXER test_lexer
STORAGE test_storage
');
I got an ORA-29851 error, which I expected because of this line:
CREATE INDEX test_idx ON legacy_objects(col1,col2)
I'm sure I should only have one column in parentheses, but what?
Should I put the first of the multiple cols there? I can't find in the docs where it tells what to put in there when dealing with multiple-column indices for context searches.
Thanks in advance for any help.
- Gerry
|
|
|