CopyPastor

Detecting plagiarism made easy.

Score: 0.7640406489372253; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2016-08-23
by Somnath Muluk

Original Post

Original - Posted on 2010-03-06
by AlexS



            
Present in both answers; Present only in the new answer; Present only in the old answer;

[CONTAINS](https://msdn.microsoft.com/en-us/library/ms187787.aspx) Searches for precise or fuzzy (less precise) matches to single words and phrases, words within a certain distance of one another, or weighted matches in SQL Server.
CONTAINS can search for:
1. A word or phrase. 2. The prefix of a word or phrase. 3. A word near another word. 4. A word inflectionally generated from another (for example, the word drive is the inflectional stem of drives, drove, driving, and driven). 5. A word that is a synonym of another word using a thesaurus (for example, the word "metal" can have synonyms such as "aluminum" and "steel").
##Note: CONTAINS is faster and will work if there is updated full-text index. If you want exact regular expression match then you can use like.
Just because MS Full-Text search does not support suffix search - only prefix, i.e. '* ' in front of '*dog *' is simply ignored. It is clearly stated in [Books Online][1] btw.
> CONTAINS can search for:
> * A word or phrase. > * The prefix of a word or phrase. > * A word near another word. > * A word inflectionally generated from another (for example, the word drive is the inflectional stem of drives, drove, driving, and driven). > * A word that is a synonym of another word using a thesaurus (for example, the word metal can have synonyms such as aluminum and steel).
Where prefix term is defined like this:
> < prefix term > ::= { "word *" | "phrase *" }
So, unfortunately: there's no way to issue a LIKE search in fulltext search.
[1]: http://msdn.microsoft.com/en-us/library/ms187787.aspx

        
Present in both answers; Present only in the new answer; Present only in the old answer;