Wildcard Expansion Causes DRG-51030 Error For Chinese Text
(Doc ID 2217966.1)
Last updated on APRIL 07, 2022
Applies to:
Oracle Text - Version 12.1.0.2 and laterInformation in this document applies to any platform.
Symptoms
- When performing a wildcard snippet query on Chinese text using CTX_QUERY.RESULT_SET followig error is reported:
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;
/
- The same token are searchable WITHOUT ERROR when using the CONTAINS query:
--RESULT: 3 records returned
select *
from SIMPLE_TEST
where contains(CONTENT, '%出%')>0;
- The number is:
select count(distinct(TOKEN_TEXT)) from DR$SIMPLE_TEST$CONTENT$I where TOKEN_TEXT like '%出%';
=====
322
- Since we did not change the WILDCARD_MAXTERMS parameter of the index, the limit should be 20000 by default.
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |