我有几层用于执行搜索的表函数。我在相关表格上有一个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
);
此功能是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
添加到查询