My Oracle Support Banner

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

Last updated on JANUARY 12, 2020

Applies to:

Oracle Text - Version to [Release 9.2 to 11.2]
Information in this document applies to any platform.


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');

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
 indextype as ctxsys.context
 parameters('lexer FOO_IDX_LEX');

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

--      ---------
 1      20

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

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

--      ---------
 1      20

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

--      ---------
 2      20th

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


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.