|
Re: Find Words in a String [message #618471 is a reply to message #618466] |
Sat, 12 July 2014 04:30 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
sss111ind wrote on Sat, 12 July 2014 13:00How to user Oracle text.
You should create oracle text index before using CONTAINS function.
SQL> CREATE INDEX idxName ON emp(ename) INDEXTYPE IS CTXSYS.CONTEXT
2 /
Index created
SQL> select * from emp where contains(ename,'MILLER')>0 and rownum < 2
2 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
----- ---------- --------- ----- ----------- --------- --------- ------
7934 MILLER CLERK 7782 1/23/1982 1300.00 10
But, you got an "invalid identifier error", please mention your DB version, hopefully it is something which supports it. AFAIK, it was introduced back in 9i. If your DB version supports and without creating the index you should get following error :
SQL> drop index idxname;
Index dropped
SQL> select * from emp where contains(ename,'MILLER')>0 and rownum < 2;
select * from emp where contains(ename,'MILLER')>0 and rownum < 2
*
ERROR at line 1:
ORA-20000: Oracle Text error:
DRG-10599: column is not indexed
Regards,
Lalit
[Updated on: Sat, 12 July 2014 04:42] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Find Words in a String [message #618487 is a reply to message #618485] |
Sat, 12 July 2014 07:39 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
Ok good.
sss111ind wrote on Sat, 12 July 2014 17:45But facing some problem while using oracle text.
Again, "Facing some problem" is not an Oracle error. What exactly is the problem?
|
|
|
|
Re: Find Words in a String [message #618491 is a reply to message #618490] |
Sat, 12 July 2014 08:12 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
And I already said :
Lalit Kumar B wrote on Sat, 12 July 2014 15:00sss111ind wrote on Sat, 12 July 2014 13:00How to user Oracle text.
You should create oracle text index before using CONTAINS function.
SQL> CREATE INDEX idxName ON emp(ename) INDEXTYPE IS CTXSYS.CONTEXT
2 /
Index created
|
|
|
|
|
Re: Find Words in a String [message #618497 is a reply to message #618493] |
Sat, 12 July 2014 08:40 |
|
sss111ind
Messages: 636 Registered: April 2012 Location: India
|
Senior Member |
|
|
I am getting this now
CREATE INDEX idxNamee ON DEPT(DNAME) INDEXTYPE IS CTXSYS.CONTEXT;
Error starting at line : 73 in command -
CREATE INDEX idxNamee ON DEPT(DNAME) INDEXTYPE IS CTXSYS.CONTEXT
Error at Command Line : 73 Column : 14
Error report -
SQL Error: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: CTXSYS.DEFAULT_LEXER
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364
29855. 00000 - "error occurred in the execution of ODCIINDEXCREATE routine"
*Cause: Failed to successfully execute the ODCIIndexCreate routine.
*Action: Check to see if the routine has been coded correctly.
[Updated on: Sat, 12 July 2014 08:40] Report message to a moderator
|
|
|
|
|
|
|
Re: Find Words in a String [message #618504 is a reply to message #618503] |
Sat, 12 July 2014 09:29 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
I just did a quick search with the error codes, and I got many responses in google, most of them are from OTN and OraFAQ. The typical resolutions are to run the post scripts properly.
|
|
|
|
Re: Find Words in a String [message #618518 is a reply to message #618466] |
Sat, 12 July 2014 12:13 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
@Duane,
Please don't get confused by so many replies to your original post, and for that matter I requested Michel to split the other topic of text search, as I believe it to be hijacked from rhe current discussion.
|
|
|
Re: Find Words in a String [message #618519 is a reply to message #618518] |
Sat, 12 July 2014 12:20 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
@Michel,
Sorry, but my most recent post was simultaneously posted after you splitted the hijacked topic. So, some of the previous messages are left here.
I understand the moderator bit stuff is sometimes quite tedious, unfortunately this one being one of them.
|
|
|
|
|
|
Re: Find Words in a String [message #618542 is a reply to message #618497] |
Sat, 12 July 2014 15:32 |
|
Barbara Boehmer
Messages: 9100 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
sss111ind wrote on Sat, 12 July 2014 06:40I am getting this now
CREATE INDEX idxNamee ON DEPT(DNAME) INDEXTYPE IS CTXSYS.CONTEXT;
Error starting at line : 73 in command -
CREATE INDEX idxNamee ON DEPT(DNAME) INDEXTYPE IS CTXSYS.CONTEXT
Error at Command Line : 73 Column : 14
Error report -
SQL Error: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: CTXSYS.DEFAULT_LEXER
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364
29855. 00000 - "error occurred in the execution of ODCIINDEXCREATE routine"
*Cause: Failed to successfully execute the ODCIIndexCreate routine.
*Action: Check to see if the routine has been coded correctly.
Apparently, you didn't run step 2 from the instructions in the installation link that you provided, to create the ctxsys.default_lexer:
Quote:
If you are working with US english texts, install appropriate language-specific default preferences:
connect CTXSYS/CTXSYS
@$ORAC1020.ctx.admin.drdefus;
If you are not working with US english texts, open the drdef*.sql script according to the preferred language, set the attribute (refer to Restrictions in the following section), and run the script.
|
|
|
|
Re: Find Words in a String [message #618661 is a reply to message #618585] |
Mon, 14 July 2014 13:14 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
@sss111ind,
Since this topic was split and it would not be easy for anybody to understand the resolution of your problem, would you mind to post what exactly you did to solve your issue. It would certainly help other folks searching for similar topic.
And of course, not to mention but just a reminder, you can mention the folks who helped you to resolve your issue alongwith the suggestion. It would be very good as forum ethics
I suggest you post it step by step. Just like you would expect a solution for your issue.
Thanks.
Edit : Added a one liner at last to justify why I requested OP to come back with his feedback.
[Updated on: Mon, 14 July 2014 13:19] Report message to a moderator
|
|
|