Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Text Question

Re: Oracle Text Question

From: bravegag <bravegag_at_gmail.com>
Date: 12 Apr 2006 10:57:24 -0700
Message-ID: <1144864644.515327.106830@u72g2000cwu.googlegroups.com>


> 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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US