I have this query:
select id from mytable where contains(all_text,'('||?||' within name)*2,
('||?||' within description)',1)>0
How does the contains in the where clause work?
Thanks,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If the first parameter occurs in the name section, then its weight is twice the weight of the second parameter occurring in the description section.
This “contains” operator will set the score variable. Without it doubling the weight has no meaning for “>0” condition. However,
would totally make sense and will order id’s first by those rows where search term is found in the name section.
Here is a useful reference, just in case: http://docs.oracle.com/cd/B19306_01/text.102/b14218/cqoper.htm