Forum Stats

  • 3,815,823 Users
  • 2,259,094 Discussions
  • 7,893,259 Comments

Discussions

Text search with ABOUT going on and off

Burkinaone
Burkinaone Member Posts: 14 Green Ribbon

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?