NO Results on 11.2.0.3 from Text Queries when Index has SWEDISH INDEX_STEMS attribute of BASIC_LEXER Lexer set (Doc ID 1433258.1)

Last updated on MAY 13, 2013

Applies to:

Oracle Text - Version: 11.2.0.3 and later   [Release: 11.2 and later ]
Information in this document applies to any platform.

Symptoms

Since upgrade to 11.2.0.3 some Text queries do not return any rows, when index has INDEX_STEMS attribute of BASIC_LEXER Lexer Type enabled for Swedish.

create table test (text varchar2(44));

insert into test values ('Lenox, Carl');
insert into test values ('Svensson, Max');
insert into test values ('Hamlberg, Ulf');
commit;

TEXT
----------------------------------------
Lenox, Carl
Svensson, Max
Hamlberg, Ulf

begin
ctx_ddl.drop_preference('MY_SWEDISH_LEXER');
end;
/

begin
ctx_ddl.create_preference('MY_SWEDISH_LEXER', 'BASIC_LEXER');
ctx_ddl.set_attribute('MY_SWEDISH_LEXER', 'index_themes', 'NO');
ctx_ddl.set_attribute('MY_SWEDISH_LEXER', 'index_text', 'YES');
ctx_ddl.set_attribute('MY_SWEDISH_LEXER', 'index_stems', 'SWEDISH');
end;
/

begin
ctx_ddl.drop_preference('MY_SWEDISH_FUZZY_PREF');
end;
/

begin
ctx_ddl.create_preference('MY_SWEDISH_FUZZY_PREF', 'BASIC_WORDLIST');
ctx_ddl.set_attribute('MY_SWEDISH_FUZZY_PREF','FUZZY_MATCH','AUTO');
ctx_ddl.set_attribute('MY_SWEDISH_FUZZY_PREF','FUZZY_SCORE','60');
ctx_ddl.set_attribute('MY_SWEDISH_FUZZY_PREF','FUZZY_NUMRESULTS','100');
ctx_ddl.set_attribute('MY_SWEDISH_FUZZY_PREF','STEMMER','AUTO');
end;
/

SQL> create index testx on test (text) indextype is ctxsys.context
parameters ('lexer MY_SWEDISH_LEXER wordlist MY_SWEDISH_FUZZY_PREF');

Index created.

SQL> select * from test where contains(text,'Hamlberg') > 0;

TEXT
----------------------------------------
Hamlberg, Ulf

SQL> select * from test where contains(text,'fuzzy(Hamlberg,50,10,weight)') > 0;

TEXT
----------------------------------------
Hamlberg, Ulf

SQL> select * from test where contains(text,'Ulf') > 0;

no rows selected

SQL> select * from test where contains(text,'fuzzy(Ulf, 50, 10, weight)') > 0;

no rows selected

Changes

Database upgrade to 11.2.0.3.
Problem also reproduces on a fresh 11.2.0.3 installation.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms