Full-width angle brackets are dealt as start&end tag in XML text index

(Doc ID 2407370.1)

Last updated on JUNE 13, 2018

Applies to:

Oracle Text - Version 12.1.0.2 and later
Information in this document applies to any platform.

Symptoms

If a Text index uses section group related to XML, such as PATH_SECTION_GROUP, XML_SECTION_GROUP, etc. FULL-WIDTH angle brackets are dealt as START tag and END tag.


1. Create test.xml (<test2> use full-width brackets)

------------------
<test1>
<test2>
<test3>
sentence
</test1>
</test3>
------------------

2. Create text index using PATH_SECTION_GROUP

drop table test;
create table test (path varchar2(100));

BEGIN
  CTX_DDL.CREATE_PREFERENCE('TEST_LEXER','JAPANESE_VGRAM_LEXER');
  CTX_DDL.CREATE_PREFERENCE('TEST_DIR','FILE_DATASTORE');
  CTX_DDL.CREATE_SECTION_GROUP('TEST_SECTION_GROUP', 'PATH_SECTION_GROUP');
END;
/

create index test_ind on test(path)
 indextype is ctxsys.context
 parameters ('lexer TEST_LEXER
 section group TEST_SECTION_GROUP
 datastore TEST_DIR sync(on commit)');

insert into test values ('<fullpath>/test.xml');

commit;


3. Query using path with 'test2', then it will return a row.

select * from test where contains (path,'sentence INPATH (/test1/test2/test3)')>0;

Changes

Database version is 12.1.0.2 or later.

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