DRG-50901 error cannot be reproduced to our test enviroments. Any ideas?

We get the following error
10:59:10,538#org.hibernate.util.JDBCExceptionReporter#ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 1
From the logs we can see that the error was produced two times when the following keywords were searched:
1) key
2) doctoral
In our test enviroments when we search those keywords we cannot reproduce the error.
Also, we parse the search keywords doing what is described below:
1) escape reserved characters with "/", e.g test { becomes test/{
2) replace double quoted phrases with curly braces for exact match "test something" becomes {test something}
3) escape reserved words and add commas between words in order to search all the words of a phrase e.g looking something becomes /looking,/something
The exact query that runs and fails to the client is:
SELECT rownum as id,
x.* from (
SELECT SCORE(1) score,
ctx_doc.snippet('eqf_trans_ot_idx', et.EQF_TRANS_ID, '/key') as snippet
FROM eqf_trans et
WHERE 1 = 1
AND contains(et.ORACLE_TEXT_COLUMN, '/key', 1) > 0)x
WHERE ROWNUM<= 100;
and
SELECT rownum as id,
x.* from (
SELECT SCORE(1) score,
ctx_doc.snippet('eqf_trans_ot_idx', et.EQF_TRANS_ID, '/doctoral') as snippet
FROM eqf_trans et
WHERE 1 = 1
AND contains(et.ORACLE_TEXT_COLUMN, '/doctoral', 1) > 0)x
WHERE ROWNUM<= 100;
Any ideas why this may occur or how I can reproduce it???

You get the following stack:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 1
when there is just about any syntax error caused by your search string, such as searching for a reserved word or stop word or null value. From what you have supplied, that does not appear to be the case. However, there are some unusual things about your query. You say that you are using / to escape, but the escape character is \ not /. You have where 1=1 which suggests that you may be constructing and executing the query dynamically. You use rownum in an outer query, but have not ordered in the inner sub-query.
I suspect that what you are running may be different from what you are posting and think you are running. You need to provide an actual copy and paste. It also helps if you include things like create table statement and insert statement for sample data, and create index statement. The various preferences in an index can make a big difference. You can use ctx_report.create_index_script to obtain and provide that.
There is a chance that you have hit some sort of bug. You should provide your Oracle version and try to narrow the problem down by eliminating one thing at a time. For example if you can show that the query does not produce an error with "where contains ..." but produces an error with "where 1=1 and contains ..." then that is significant.

Similar Messages

Maybe you are looking for

  • Servlet only gets null values from mobile

    OK, i'm doing a project for college which involves inputting data into an application on a mobile device, sending them to a servlet and updating a database. I've got my mobile app working and sending but the servlet is only receiving null values for

  • Search results bar

    i want some help to implement a sort of a search results bar. after a search the results are put in dynamic pages. which looks like 1 2 3 >> at the bottom of the page which are links to a dynamic page? i basically perform the search.. on a database a

  • I'm setting up my new iMac and need digital audio out.

    I'm running a top spec iMac with AVID and FCP. I need to export the audio to my amp as a digital signal. How can I do this???

  • Dynamically create javascripts using pl/sql code from page header

    I understand by placing a javascript code in the page header is one of the way adding javascript functionality to your pages. But lets say I need (dynamically) bring my javascripts into the page header using my pl/sql package/functions like core_func

  • Execution of gi installation script failed windows

    I have windows 2012, i tried install Oracle grid but in 83% , it get an error : INS-32123 execution of gi installation script failed . How can i solve?