I am using full-text search in SQL Server 2008. The following query
select * From MyTable where contains( *, 'FLOW AND VALVE')
returns two rows:
1. FLOW CONTROL VALVE
2. FLOW VALVE
but the following query
select * From MyTable where contains( *, '"FLOW AND VALVE"'))
returns only one row:
1. FLOW CONTROL VALVE
Why doesn’t the second query return the second row?
If you are on SQL Server 2008 you can get some clues from running
CONTAINS( *, 'FLOW AND VALVE')is interpreted as two<simple_term>searches joined together with a boolean condition. i.e.CONTAINS( *, 'FLOW') AND CONTAINS( *, 'VALVE')CONTAINS( *, '"FLOW AND VALVE"'))is interpreted as a phrase search with the “And” ignored as a noise word.As to why the second one matches “FLOW CONTROL VALVE” but not “FLOW VALVE” From this article
so essentially the presence of the stop word acts as a wildcard word match.