Why Does Stem Search of Alphanumeric Token Return No Rows with INDEX_STEMS=ENGLISH? (Doc ID 1419116.1)

Last updated on FEBRUARY 28, 2012

Applies to:

Oracle Text - Version: 9.2.0.1 to 11.2.0.3 - Release: 9.2 to 11.2
Information in this document applies to any platform.

Goal

Stem search of alphanumeric token using DIRECT_DATASTORE and INDEX_STEMS=ENGLISH for lexer attribute results in no rows found.

To recreate the issue:

create table foo (id integer, string varchar2(30));

insert into foo values (1,'20');
insert into foo values (2,'20th');
commit;

exec ctx_ddl.create_preference('FOO_IDX_LEX','BASIC_LEXER');

exec ctx_ddl.set_attribute('FOO_IDX_LEX','INDEX_STEMS','ENGLISH');

create index FOO_IDX
 on FOO (STRING)
 indextype as ctxsys.context
 parameters('lexer FOO_IDX_LEX');

select * from foo where contains(string,'20')> 0;

ID      STRING
--      ---------
 1      20

-- STEMMING of "20th" is not returned-- WHY?

select * from foo where contains(string,'$20th')> 0;

ID      STRING
--      ---------
 1      20

select * from foo where contains(string,'20th')> 0;

ID      STRING
--      ---------
 2      20th

Why does the stemming of an alphanumeric fail to return in a contains search with INDEX_STEMS attribute set to ENGLISH?

Solution

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