Wildcard Expansion Causes DRG-51030 Error For Chinese Text (Doc ID 2217966.1)

Last updated on DECEMBER 26, 2016

Applies to:

Oracle Text - Version 12.1.0.2 and later
Information in this document applies to any platform.

Symptoms

select
get_simple_test_result_set(
'SIMPLE_TEST$CONTENT',
'%出%')
from dual;

ORA-20000: Oracle Text error:
DRG-50857: oracle error in ctx_query.result_set
ORA-20000: Oracle Text error:
DRG-51030: wildcard query expansion resulted in too many terms

 --Failing code that uses result_set:
create or replace
function
get_simple_test_result_set (
indexName in varchar2,
queryString in varchar2
) return clob
is
outclob clob;
rsd clob := '<ctx_result_set_descriptor>
<count exact="true"/>
<hitlist start_hit_num="1" end_hit_num="20">
<snippet radius="40" max_length="2000" starttag="<strong>"
endtag="</strong>" />
</hitlist>
</ctx_result_set_descriptor>';
begin
dbms_lob.createtemporary(outclob, true);
ctx_query.result_set(indexName, queryString, rsd, outclob);
return outclob;
end;
/

 

--RESULT: 3 records returned
select *
from SIMPLE_TEST
where contains(CONTENT, '%出%')>0;

 

select count(distinct(TOKEN_TEXT)) from DR$SIMPLE_TEST$CONTENT$I where TOKEN_TEXT like '%出%';

=====
322

 

 

Cause

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 hundreds of Community platforms