Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Text Question
> Here is the error I get ...
> ==================
> OR contains(con_last_name, 'wellstone', 1) > 0
> *
>
> ERROR at line 4:
> ORA-29907: found duplicate labels in primary invocations
>
Well actually your problem is pretty easy to solve. See the number 1
must NOT be repeated per different contains query ... because
this number is used to univoquely identify that contains clause
for i.e. using the score(1) value e.g.
select score(1), score(2)
from my_table
where contains (..., 1) or contains(..., 2)
if you repeat the 1 then Oracle TEXT tells you is wrong because it wont be able to identify the contains clause.
After you fix that, I still recommend you use the UNION ALL the CBO works cleaner that way i.e. using appropriate indexes, if curious then try out getting the execution plan for both cases (using contains with OR vs using UNION ALL) and see how different they look.
HTH,
Regards,
Me
Received on Wed Apr 12 2006 - 12:57:24 CDT