What is the difference between freetexttable and containstable

Asked

Viewed 192 times

1

I am mounting a query that will need to take the term typed in a search and make a query by similarity proximity in the content. Is being used a "rank" that is generated with the use of these commands.

The two commands seemed very similar to me, I could not catch the difference between the two. What differs from each other in SQL SERVER?

  • See:http://codingcanvas.com/full-text-queries-containstable-and-freetexttable-functions/

1 answer

1


The 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 in the select I do) Freetexttable allows freetext (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 contais and freetext to make the example simpler These two selects can give different results, because contains will only search for the word recipe, and freetext will look for various forms of the word recipe.

  • What would these various forms of the word recipe?

  • Generates inflectional Forms of the words (stemming). In a simple way: derivatives of the word (synonyms, verbal forms, etc)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.