Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Text search with ABOUT going on and off

BurkinaoneJun 12 2020

Hello.

db is 11.2.0.4

I created a table with a context index to search themes. Here is what I did:

begin

ctx_ddl.create_preference('MYLEXER', 'BASIC_LEXER');

ctx_ddl.set_attribute('MYLEXER', 'index_stems', 'ENGLISH');

ctx_ddl.set_attribute('MYLEXER', 'base_letter', 'YES');

ctx_ddl.set_attribute('MYLEXER', 'index_themes', 'YES');

ctx_ddl.set_attribute('MYLEXER', 'index_text', 'YES');

end;

begin

  ctx_ddl.create_preference('MYWORDLIST', 'BASIC_WORDLIST');

  ctx_ddl.set_attribute('MYWORDLIST','STEMMER','ENGLISH');

  ctx_ddl.set_attribute('MYWORDLIST','FUZZY_MATCH','ENGLISH');

  ctx_ddl.set_attribute('MYWORDLIST','FUZZY_NUMRESULTS','50');

  ctx_ddl.set_attribute('MYWORDLIST','SUBSTRING_INDEX','TRUE');

end;

create table mytable (empid number(10) not null, mytext varchar2(250));

insert into mytable(1,'Robert is the teacher');

commit;

CREATE INDEX MYINDEX ON mytable

(mytext)

INDEXTYPE IS CTXSYS.CONTEXT

PARAMETERS('LEXER MYLEXER WORDLIST MYWORDLIST SYNC (ON COMMIT)');

I then run this:

select * from mytable where contains(mytext,'about(teacher)')>0;

The problem is that sometimes it returns the row and sometimes not.

The row is always in the table.

Do anybody know what is happening?

Comments
Post Details
Added on Jun 12 2020
0 comments
176 views