I’m currently using the query
SELECT Url FROM Link WHERE CONTAINS(Url, 'href=blah')
It is including results with href=/blah. Any way I can tell the query to act more like WHERE Url LIKE '%href=blah%' and still use the full-text catalog?
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.
Your problem is that
=and/are both word breakers, in other words, sql fulltext is actually searching forhrefandblahThere are a couple of options you could try. First you could filter down the search domain using the fulltext engine, then search the subset of data using
LIKE. You’ll need to experiment to see how to squeeze out the best performance.The other option is, if
href=blahis a consistent term you could add that to a custom dictionary. A good article on this is here.