What is the difference between freetexttable and containtable

1

I am putting together a query that will need to get the term typed in a search and query for similarity in the content. A "rank" that is generated using these commands is being used.

The two commands seemed to me very similar, I could not make out the difference between the two. What differs from one another in SQL SERVER?

    
asked by anonymous 10.11.2016 / 17:24

1 answer

1

containstable allows you to specify and build in more detail what you want to look for (it is usually more useful when I have more control on the select I make) The freetexttable allows freer text (hence the name). ex:

SELECT id, titulo FROM titulos
WHERE CONTAINS(notas, 'receita')

SELECT id, titulo FROM titulos
WHERE FREETEXT(notas, 'receita')

Ps: I'm using the account and freetext for the example to be simpler These two selects can give different results because contains will search only for the word recipe, and the freetext will look for several forms of the word recipe.

    
10.11.2016 / 18:05