Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Oracle search CONTAINS

Haile HCMar 26 2024

Hi,

I have an issue on oracle 19c related to text search

Here's my test case

CREATE TABLE accumtbl
(id NUMBER, text VARCHAR2(4000) )

INSERT INTO accumtbl VALUES
( 1, 'the little dog played with the big dog while the other dog ate the dog food');

INSERT INTO accumtbl values
(2, 'the cat played with the dog in');

commit

CREATE INDEX
accumtbl_idx ON accumtbl (text)
indextype is ctxsys.context

SELECT
t.*,
score(1)
FROM
accumtbl t
WHERE
CONTAINS (text, 'food accum in',1) > 0
order by score(1) desc

and the record with text the cat played with the dog in not return

Please help me on this case

Thank you.

This post has been answered by User_3ABCE on Mar 26 2024
Jump to Answer
Comments
Post Details
Added on Mar 26 2024
3 comments
94 views