我有几层用于执行搜索的表函数。我CTXCAT
在相关表格上有一个索引。
直接调用一个特定函数时,我没有收到任何错误并得到我期望看到的结果
但是,当我调用一个调用有效函数的函数时(如上所述),我收到一个DRG-10849
错误
ORA-20000: Oracle Text error:
DRG-10849: catsearch does not support functional invocation
ORA-06512: at "SCHEMA.SEARCH", line 857
ORA-06512: at line 1
ORA-06512: at "SCHEMA.SEARCH", line 629
ORA-06512: at line 1
ORA-06512: at "SCHEMA.SEARCH", line 723
ORA-06512: at line 1
ORA-06512: at "SCHEMA.SEARCH", line 1181
ORA-06512: at line 1
SCHEMA.SEARCH
第 857 行是:
for r_count in c_count loop
的代码c_count
是
cursor c_count is
select
sum(cnt) cnt
from
(
select
count(*) cnt
from
synonyms
where
P_SEARCH IS NOT NULL AND
catsearch(synonym_value, nvl(p_search, 'a'), '') > 0
union all
select
count(*) cnt
from synonyms
where p_search is null
);
this 所在的函数是SCHEMA.SEARCH.SYNONYM_SEARCH
. 当我直接调用它时:
select * from table(search.synonym_search(null))
我得到了我想要的结果
但是,当我调用以下命令时:
select * from table(search.company_dictionary_search(null))
我收到上面列出的错误
该synonym_search
函数周围的代码如下:
select ss.score, ct.concept_id
from table(search.synonym_search(p_search)) ss,
term_synonym ts,
concept_term ct,
concept c,
concept_types cts
where ss.table_id = ts.SYNONYMS_ID
and ts.TERM_ID = ct.TERM_ID
and c.concept_id = ct.concept_id
and c.concept_type_id = cts.concept_type_id
我不知道为什么会发生这种情况,但它给我带来了一些重大问题,因为这是在实时系统上。
谢谢你的帮助。
编辑
自从我添加UNION ALL
到查询中才出现错误