If I search on
WHERE CONTAINS (column_name, 'f开发者_如何转开发ox NEAR chicken')
the document is still returned, even if the words fox and chicken are hundreds or thousands of words apart in column_name.
I would have assumed that only documents where those words are within 50 (or so) words of each other would have been returned.
According to the book Pro Full-Text Search in SQL Server 2008:
... the NEAR operator is basically useless with the iFTS CONTAINS and FREETEXT predicates (it's no difference from using the AND operator). To get a true proximity search, you need to use CONTAINSTABLE or FREETEXTTABLE and restrict the results with the WHERE clause. Your WHERE clause predicate should specify that the RANK column returned by the iFTS function needs to be greater than 0...
精彩评论