Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Oracle Text query

Oracle Text query

From: Joe Smith <joe_dba_at_hotmail.com>
Date: Thu, 16 Mar 2006 07:51:46 -0600
Message-ID: <BAY107-F1743A5E230244895BD395E97E70@phx.gbl>


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
Received on Thu Mar 16 2006 - 07:51:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US