Home » Server Options » Text & interMedia » Trying to create Index with Multi column Datastore parameter gives error (10g)
Trying to create Index with Multi column Datastore parameter gives error [message #314024] Tue, 15 April 2008 10:10 Go to next message
Shahriar
Messages: 3
Registered: April 2008
Junior Member
I have successfully created Multi Column Datastore (MCDS) and Section Groups (SG) and was also able to add field section to the section group. I also set the COLUMNS attribute value for the data store.
But when I try to create the Index for the MCDS, it seems to give me an error.

The code for creating the MCDS & SG and setting their respective attributes/values is as follows:

CTX_DDL.CREATE_PREFERENCE ('my_table_mcds', 'MULTI_COLUMN_DATASTORE');
CTX_DDL.SET_ATTRIBUTE ('my_table_mcds', 'COLUMNS', 'varchar2_col_Name, varchar2_col_Name2');
CTX_DDL.CREATE_SECTION_GROUP ('my_table_sg', 'BASIC_SECTION_GROUP');
CTX_DDL.ADD_FIELD_SECTION ('my_table_sg', 'varchar2_col_Name', 'varchar2_col_Name', TRUE);
CTX_DDL.ADD_FIELD_SECTION ('my_table_sg', 'varchar2_col_Name2', 'varchar2_col_Name2', TRUE);


Here's how I try to create the index

CREATE INDEX my_index ON my_table (varchar2_col_Name) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('DATASTORE mytable_mcds SECTION GROUP mytable_sg');

I get the following error:

ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10707: a value is required for attribute COLUMNS of preference bcItemRevisions_mcds1
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364

Could anybody please provide some suggestion as to what I might be doing wrong?

P.S. I tried with the following code and it worked for section group ONLY:

CREATE INDEX my_index ON my_table (varchar2_col_Name) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SECTION GROUP mytable_sg');

Seems there is something wrong with my DATASTORE parameter although I checked to see that it's created before executing this piece of code.

Thanks,

Shahriar Hyder
Re: Trying to create Index with Multi column Datastore parameter gives error [message #314036 is a reply to message #314024] Tue, 15 April 2008 11:06 Go to previous messageGo to next message
Shahriar
Messages: 3
Registered: April 2008
Junior Member
Sorry Please read myTable_mcds instead of "bcItemRevisions_mcds1".

Also when I try to execute the same create index statement from code (C#), I get invalid character error message. Is it because I need to escape the single quote (') character somehow before executing it?
Re: Trying to create Index with Multi column Datastore parameter gives error [message #314038 is a reply to message #314024] Tue, 15 April 2008 11:18 Go to previous message
Shahriar
Messages: 3
Registered: April 2008
Junior Member
As it turns out, just for everybody else's benefit, my database provider didn't like the semi-colon(Wink at the end of the create index statement. Now it's solved by removing the extra character. Hope it will help others.
Previous Topic: Index fragmentation
Next Topic: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
Goto Forum:
  


Current Time: Sun Nov 03 01:04:56 CDT 2024