I tried the below given script and I got no result for ” SELECT SCORE(1), id, name FROM mytxts WHERE CONTAINS(name, ‘MS’, 1) > 0 ; ” , whereas all other queries works just like a charm.
I couldn’t find any fix to get the result of the above query. Is Oracle completely avoiding MS ? 🙂 Just kidding.
Can anyone give an answer ?
Thanks in advance.
I tried the below in my 19c Oracle DB.
CREATE TABLE mytxts (id NUMBER PRIMARY KEY, name VARCHAR2(200));
INSERT INTO mytxts VALUES(1, ‘California is a state in the US.’);
INSERT INTO mytxts VALUES(2, ‘Paris is a city in France.’);
INSERT INTO mytxts VALUES(3, ‘France is in Europe.’);
INSERT INTO mytxts VALUES(4, ‘MS’);
INSERT INTO mytxts VALUES(5, ‘MS1’);
INSERT INTO mytxts VALUES(6, ‘MSA’);
INSERT INTO mytxts VALUES(7, ‘MS2’);
INSERT INTO mytxts VALUES(8, ‘ MS ‘);
INSERT INTO mytxts VALUES(9, ‘ms’);
INSERT INTO mytxts VALUES(10, ‘ms1’);
INSERT INTO mytxts VALUES(11, ‘msa’);
INSERT INTO mytxts VALUES(12, ‘Paris is a city in France’);
INSERT INTO mytxts VALUES(13, ‘France’);
INSERT INTO mytxts VALUES(14, ‘MS is a name’);
INSERT INTO mytxts VALUES (15, ‘ MSD is a Indian Cricket Player.’) ;
INSERT INTO mytxts VALUES (16, ‘ MS was found by Bill Gates.’) ;
INSERT INTO mytxts VALUES (17, ‘ KS is my name.’) ;
INSERT INTO mytxts VALUES (18, ‘ KS is MS’) ;
INSERT INTO mytxts VALUES (19, ‘ KS is not MS. ‘) ;
COMMIT ;
DROP INDEX IDX_MYTXTS ;
CREATE INDEX idx_mytxts ON mytxts (name)
INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS
(‘FILTER CTXSYS.NULL_FILTER SECTION GROUP CTXSYS.HTML_SECTION_GROUP’);
COLUMN name FORMAT a40;
SELECT * FROM MYTXTS ORDER BY ID desc;
SELECT SCORE(1), id, name FROM mytxts WHERE CONTAINS(name, ‘France’, 1) > 0;
SELECT SCORE(1), id, name FROM mytxts WHERE CONTAINS(name, ‘KS’, 1) > 0 ;
— No results for this query.
SELECT SCORE(1), id, name FROM mytxts WHERE CONTAINS(name, ‘MS’, 1) > 0 ;
Sundar The1st is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.