catsearch wildcard [message #75929] |
Thu, 14 March 2002 16:20 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cmn
Messages: 19 Registered: March 2002
|
Junior Member |
|
|
I create ctxcat index on table temp(column type) by following advice from Sinan:
call ctx_ddl.create_preference('subs_pre_ind','basic_wordlist');
call ctx_ddl.set_attribute('subs_pre_ind','PREFIX_INDEX','YES');
call ctx_ddl.set_attribute('subs_pre_ind','PREFIX_MIN_LENGTH',3);
call ctx_ddl.set_attributecall ('subs_pre_ind','PREFIX_MAX_LENGTH', 6);
call ctx_ddl.set_attribute('subs_pre_ind','SUBSTRING_INDEX', 'YES');
call ctx_ddl.create_index_set('temp_iset');
call ctx_ddl.add_index('temp_iset','trade_id');
create index temp$type on temp(type) indextype is ctxsys.ctxcat parameters('wordlist subs_pre_ind index set temp_iset');
after index created
select tyep from temp where catsearch(type,'%tt%',null)>0;
return only like the following:
A32-LC-TT
A24-LC-TT
M959-TT-617-20
ST6392B4/TT
98910 NEW BRIGHT TT-03
BUT the following result can't return:
TTWB-1-C
WBTT
I hope the statement (select type from temp where catsearch(type,'%tt%',null)>0) can return the same as the statement (select type from temp where type like '%TT%' or type like '%tt%')
How can i do?
help me!
create
|
|
|
Re: catsearch wildcard [message #75930 is a reply to message #75929] |
Fri, 15 March 2002 04:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
sinan
Messages: 5 Registered: March 2002
|
Junior Member |
|
|
observ that you have chosen
call ctx_ddl.set_attribute('subs_pre_ind','PREFIX_MIN_LENGTH',3);
in this case you should ('PREFIX_MIN_LENGTH',2) when you create index.
index is case insensitive, %tt% and %TT% should get
same result_set
|
|
|