Can you do AND keyword searches using FREETEXT () on SQL Server 2005?

There is a request to make the default SO search an AND style function over the current OR when multiple terms are used.

The official answer was:

not as simple as it seems; we are using the SQL Server 2005 FREETEXT () function and I cannot find a way to specify AND and OR - can you?

So is there a way?

There are a number of resources that I can find, but I'm not an expert.

+3
source share
3 answers

, . CONTAINS() AND FREETEXT() OR.

+1

, FREETEXT() SQL Server 2005 ( 2008, afaik).

FREETEXT , . :

WHERE FREETEXT('You gotta love MS-SQL') > 0
 AND FREETEXT('You gotta love MySQL too...') >  0

, :)

- , Boolean, . , . , . , .

CONTAINS() FREETEXT() .

+2

I just started reading about freetext, so bear with me. If what you are trying to do is allow the search for a tag, say, VB, also find things marked as VB6, Visual Basic, VisualBasic and VB.Net, will these values ​​be set as synonyms in the database tester, and not in the parameters request

If this is true, the MSDN link explains how to add elements to the thesaurus.

+1
source

Source: https://habr.com/ru/post/1696519/


All Articles