My Oracle Support Banner

Progressively Relaxed Query with AND (&) Operator works on but Fails with DRG-50962 on 11gR2 (Doc ID 1312422.1)

Last updated on APRIL 11, 2011

Applies to:

Oracle Text - Version: to - Release: 11.2 to 12.0
Information in this document applies to any platform.


A Oracle Text search using query rewrite template with token "&" character causes the query to fail in 11gR2 with below errors whereas the same query works fine in

create table test(case_id number primary key, text varchar2(50));

set define off

insert into test values(1, 'Test text for service request.');
insert into test values(2, 'Text contains &test % | - special chars.');
insert into test values(3, 'Summary text');

select * from test;

---------- --------------------------------------------------
         1 Test text for service request.
         2 Text contains &test % | - special chars.
         3 Summary text

create index test_idx on test(text) indextype is ctxsys.context;

SELECT score(0) score, case_id, text
from test
where contains(Text, '
<textquery lang="ENGLISH" grammar="CONTEXT">contain test&
<seq><rewrite>transform((TOKENS, "{", "}", " OR "))</rewrite></seq>
<score datatype="INTEGER" algorithm="COUNT"/>
', 0) > 0

SELECT score(0) score, case_id, text
ERROR at line 1:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50962: Query operators are not allowed in transform input string


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.