In Oracle Database 10g and Oracle Database Express Edition 11g, I came across some weird behavior. I have a column that is indexed as an index of type ctxsys.context. When I query a table for results using the contains function, it works, unless the value I'm looking for is "Still." Then it does not return any results. When I look for the same data with a column like "Still", I get the results as usual. If I search for "Jazz" using contains, I usually get results.
Below sql I used to reproduce this behavior in a newly created test pattern.
create table "STILL_TEST" (
"ID" number(22,0) primary key,
"PROF_DATA_15" varchar2(255 char),
"OTHER" varchar2(255 char),
"SHORTER" varchar2(100 char)
);
insert into "STILL_TEST" values (1, 'Still', 'Still', 'Still');
insert into "STILL_TEST" values (3, 'Jazz', 'Jazz', 'Jazz');
CREATE INDEX "STILL_TEST_PROF_DATA_15" ON "STILL_TEST" ("PROF_DATA_15")
INDEXTYPE IS "CTXSYS"."CONTEXT" PARAMETERS ('SYNC (ON COMMIT)');
commit;
select * from "STILL_TEST" where prof_data_15 like 'Jazz';
select * from "STILL_TEST" where contains(prof_data_15, 'Jazz') > 0;
select * from "STILL_TEST" where prof_data_15 like 'Still';
select * from "STILL_TEST" where contains(prof_data_15, 'Still') > 0;