I have first time encountered the error:

ORA-29907: found duplicate labels in primary invocations

after testing the change request we have implemented recently. The error message was not very helpful - I was not exactly sure which labels and which invocations ;-) - and as Oracle guru who actually does understand fine details of Oracle Text was visiting sunny India, I was on my own.

The change addressed an issue in repository search: users were asking for more flexible processing of full text search phrases: instead of e.g. searching for "unit test" search for document that contains both unit AND test. The text was parsed in Java and the SQL generator produced instead of something like

[sourcecode language='sql']

SELECT * FROM DOCUMENT d1 WHERE ROWNUM 5)

[/sourcecode]
[sourcecode language='sql']

SELECT * FROM DOCUMENT d1 WHERE ROWNUM 5)
AND ( CONTAINS(d1.document,'unit',1) > 5)

[/sourcecode]I am still unsure what primary invocation is, but the above mentioned 'label' was the number one. After changing the generator to issue sequence numbers in the CONTAINS, everything worked OK:

[sourcecode language='sql']

SELECT * FROM DOCUMENT d1 WHERE ROWNUM 5)
AND ( CONTAINS(d1.document,'unit',2) > 5)

[/sourcecode]