文档解释
ORA-18161: FTST0002 – FTUnaryNot operator not supported
Cause: An implementation that enforces one of the restrictions on FTUnaryNot must raise a static error if a full-text query does not obey the restriction.
Action: Do not use the FTUnaryNot full-text query operator.
ORA-18161: FTST0002 – FTUnaryNot operator not supported是当在TEXT或CONTAINS子句中使用UnaryNot运算符时,数据库会出现这个错误。
官方解释
常见案例
SELECT * FROM test_table t
WHERE CONTAINS(t.column_name, ‘!word’) > 0;
一般处理方法及步骤
1.可以尝试用括号将取反的查询条件包裹起来,比如:
SELECT * FROM test_table t
WHERE CONTAINS(t.column_name, ‘(word)’) > 0;
2.也可以考虑使用语言约束(language constraints),用来替换UnaryNot运算符,比如:
SELECT * FROM test_table t
WHERE CONTAINS(t.column_name, ‘word NOT’) > 0;