Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » oracle l »

Oracle Text query

Joe Smith

2006-03-16

Replies:

List,

As shown below, we have defined the underscore and hyphen characters as
printjoins.

begin
ctx_ddl.set_attribute('mdf_text_lexer_prf', 'printjoins', '_-');
end;



Therefore, when we issue the following query:

select * from table_name_tab
where contains(column_name_metadata, 'the\_world\_is\_big')>1

The underscore character is treated in the same manner as any
alphabetic character (ie. a, b, c, etc.) and it only matches
on the exact phrase "the_world_is_big" as expected.

However, if we put a wildcard in the expression:

select * from table_name_tab
where contains(column_name_metadata, 'the\_world\_is\_bi%')>1

the query suddenly starts matching the following strings:
the_world_is_big
theZworldZisZbig
the3world2is1b

With the same query, the following do not match:
theZZworld_is_big
the_world__is_big

Therefore, it seems to act as though the underscore is not escaped.
In other words it appears to act as though we issued the following query:

select * from table_name_tab
where contains(column_name_metadata, 'the_world_is_bi%')>1

Does anybody know, or is there and explanation for this behavior?

thanks.

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee?
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--
http://www.freelists.org/webpage/oracle-l


©2008 dba.5341.com - Jax Systems, LLC, U.S.A.