Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to search for special characters in oracle text?

jymarkusgJul 14 2014 — edited Jul 17 2014

Hi!

I'm using 11.2 enterprise edition.

I've the following index parameters:

exec ctx_ddl.create_preference('sd_basic_lexer', 'basic_lexer');

exec ctx_ddl.set_attribute('sd_basic_lexer', 'mixed_case', 'NO');

Table:

create table otext (title varchar2(100));

My index definition:

CREATE INDEX otext_ctx1 ON otext(title) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS

('lexer sd_basic_lexer SYNC (ON COMMIT)');

For example the title column of my table has the following values:

insert into otext values ('in version 3.6 there everything was ok');

insert into otext values ('the problem has gone after applying patch 3-5');

insert into otext values ('production system (winx64, oracle 11 [11.2.0.3]) up and running');

insert into otext values ('system stands still after patch 1,2,3!');

commit;

Queries:

select * from otext where contains (title, '3.6') > 0;

--> returns one row, ok!

select * from otext where contains (title, '3') > 0;

--> returns only the second row!?!?! I would have expected all three rows because the character 3 exists in all rows...

select * from otext where contains (title, '(win') > 0;

--> returns an error:

ORA-29902: error in executing ODCIIndexStart() routine

ORA-20000: Oracle Text error:

DRG-50901: text query parser syntax error on line 1, column 5 

29902. 00000 -  "error in executing ODCIIndexStart() routine"

*Cause:    The execution of ODCIIndexStart routine caused an error.

*Action:   Examine the error messages produced by the indextype code and

           take appropriate action.

So how can I use oracle text to query words with special characters???

Best Regards,
Markus

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2014
Added on Jul 14 2014
3 comments
3,662 views