Home » Server Options » Text & interMedia » DRG-10837: section 'string' does not exist (Oracle 10g)
DRG-10837: section 'string' does not exist [message #433568] Thu, 03 December 2009 00:56 Go to next message
k_mitra100
Messages: 28
Registered: October 2007
Location: Kolkata
Junior Member
Hi,

I am encountering the following error while executing a contains query.

DRG-10837: section 'string' does not exist


The table description is as follows:

id number,
description clob

The query is:

select * from table1 where
contains (description,'2 WITHIN field1 AND 1234567 WITHIN field2 AND ( 12345 ) WITHIN field2 AND (6789) WITHIN field3')>0

error : DRG-10837: section field3 does not exist

The table has a row with a tag 'field3' in description column and we can read that while we read table by id. But the contains query is not working if '6789) WITHIN field3' is given in condition. If this part is skiped from contains clause, then contains query is working fine and returning expected results.

Thanks in advance,
Kaushik.
Re: DRG-10837: section 'string' does not exist [message #433715 is a reply to message #433568] Thu, 03 December 2009 15:45 Go to previous messageGo to next message
Barbara Boehmer
Messages: 7984
Registered: November 2002
Location: California, USA
Senior Member
Please post the results of:

SELECT CTX_REPORT.CREATE_INDEX_SCRIPT ('your_index_name') FROM DUAL
/

and provide an actual copy and paste of a run of your failed query and a successful run without the problem clause, including the result of both. With just what you have supplied, I am unable to reproduce your problem, as shown below. My best guess would be that your index was not created using auto section group, but using manual section groups, and no section was created on the field3 tag.

SCOTT@orcl_11g> CREATE TABLE table1
  2    (id	     NUMBER,
  3  	description  CLOB)
  4  /

Table created.

SCOTT@orcl_11g> INSERT INTO table1
  2  VALUES (1,
  3  '<field1>2</field1>
  4  <field2>1234567 12345</field2>
  5  <field3>6789</field3>')
  6  /

1 row created.

SCOTT@orcl_11g> INSERT INTO table1
  2  VALUES (2,
  3  '<field1>2</field1>
  4  <field2>1234567 12345</field2>')
  5  /

1 row created.

SCOTT@orcl_11g> CREATE INDEX table1_idx
  2  ON table1 (description)
  3  INDEXTYPE IS CTXSYS.CONTEXT
  4  PARAMETERS
  5    ('SECTION GROUP	CTXSYS.AUTO_SECTION_GROUP
  6  	 STOPLIST	CTXSYS.EMPTY_STOPLIST')
  7  /

Index created.

SCOTT@orcl_11g> select * from table1 where
  2  contains (description,
  3  	       '2 WITHIN field1 AND
  4  		1234567 WITHIN field2 AND
  5  		( 12345 ) WITHIN field2 AND
  6  		(6789) WITHIN field3') > 0
  7  /

        ID
----------
DESCRIPTION
--------------------------------------------------------------------------------
         1
<field1>2</field1>
<field2>1234567 12345</field2>
<field3>6789</field3>

Re: DRG-10837: section 'string' does not exist [message #433717 is a reply to message #433568] Thu, 03 December 2009 16:00 Go to previous messageGo to next message
Barbara Boehmer
Messages: 7984
Registered: November 2002
Location: California, USA
Senior Member
Here is a reproduction of what I suspect you have, an index with manual sections without a section on the field3 tag, followed by a correction, by adding a section for the field3 tag then dropping and recreating the index.

-- reproduction:
SCOTT@orcl_11g> CREATE TABLE table1
  2    (id	     NUMBER,
  3  	description  CLOB)
  4  /

Table created.

SCOTT@orcl_11g> INSERT INTO table1
  2  VALUES (1,
  3  '<field1>2</field1>
  4  <field2>1234567 12345</field2>
  5  <field3>6789</field3>')
  6  /

1 row created.

SCOTT@orcl_11g> INSERT INTO table1
  2  VALUES (2,
  3  '<field1>2</field1>
  4  <field2>1234567 12345</field2>')
  5  /

1 row created.

SCOTT@orcl_11g> BEGIN
  2    CTX_DDL.CREATE_SECTION_GROUP ('table1_sec_group', 'BASIC_SECTION_GROUP');
  3    CTX_DDL.ADD_FIELD_SECTION ('table1_sec_group', 'field1', 'field1');
  4    CTX_DDL.ADD_FIELD_SECTION ('table1_sec_group', 'field2', 'field2');
  5  END;
  6  /

PL/SQL procedure successfully completed.

SCOTT@orcl_11g> CREATE INDEX table1_idx
  2  ON table1 (description)
  3  INDEXTYPE IS CTXSYS.CONTEXT
  4  PARAMETERS
  5    ('SECTION GROUP	table1_sec_group
  6  	 STOPLIST	CTXSYS.EMPTY_STOPLIST')
  7  /

Index created.

SCOTT@orcl_11g> select * from table1 where
  2  contains (description,
  3  	       '2 WITHIN field1 AND
  4  		1234567 WITHIN field2 AND
  5  		( 12345 ) WITHIN field2 AND
  6  		(6789) WITHIN field3') > 0
  7  /
select * from table1 where
*
ERROR at line 1:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-10837: section field3 does not exist


SCOTT@orcl_11g> select * from table1 where
  2  contains (description,
  3  	       '2 WITHIN field1 AND
  4  		1234567 WITHIN field2 AND
  5  		( 12345 ) WITHIN field2') > 0
  6  /

        ID
----------
DESCRIPTION
--------------------------------------------------------------------------------
         1
<field1>2</field1>
<field2>1234567 12345</field2>
<field3>6789</field3>

         2
<field1>2</field1>
<field2>1234567 12345</field2>


-- correction:
SCOTT@orcl_11g> BEGIN
  2    CTX_DDL.ADD_FIELD_SECTION ('table1_sec_group', 'field3', 'field3');
  3  END;
  4  /

PL/SQL procedure successfully completed.

SCOTT@orcl_11g> DROP INDEX table1_idx
  2  /

Index dropped.

SCOTT@orcl_11g> CREATE INDEX table1_idx
  2  ON table1 (description)
  3  INDEXTYPE IS CTXSYS.CONTEXT
  4  PARAMETERS
  5    ('SECTION GROUP	table1_sec_group
  6  	 STOPLIST	CTXSYS.EMPTY_STOPLIST')
  7  /

Index created.

SCOTT@orcl_11g> select * from table1 where
  2  contains (description,
  3  	       '2 WITHIN field1 AND
  4  		1234567 WITHIN field2 AND
  5  		( 12345 ) WITHIN field2 AND
  6  		(6789) WITHIN field3') > 0
  7  /

        ID
----------
DESCRIPTION
--------------------------------------------------------------------------------
         1
<field1>2</field1>
<field2>1234567 12345</field2>
<field3>6789</field3>


SCOTT@orcl_11g> 

Re: DRG-10837: section 'string' does not exist [message #433837 is a reply to message #433717] Fri, 04 December 2009 08:11 Go to previous message
k_mitra100
Messages: 28
Registered: October 2007
Location: Kolkata
Junior Member
Hi Barbara,

Thanks for your reply.

I have however solved the issue by rebuilding meta data index.


The rebuild command is given as:
exec ctx_ddl.sync_index(
idx_name => 'table1_idx'
, memory => '200M'
);



The index was created with following command:
CREATE INDEX table1_idx
ON table1 ( description )
INDEXTYPE IS ctxsys.context
PARAMETERS
(
FILTER ctxsys.null_filter
LEXER table1_multi_lexer
LANGUAGE COLUMN lexer_lang
STOPLIST table1_stoplist
SECTION GROUP table1_group
SYNC ( MANUAL )
MEMORY 200M
);


Thanks,
Kaushik

Previous Topic: .tif Format to .Img format
Next Topic: bad format when converting RTF 2 Plain text (merged)
Goto Forum:
  


Current Time: Thu Sep 18 23:17:16 CDT 2014

Total time taken to generate the page: 0.09812 seconds