Groups | Blog | Home
all groups > sql server full text search > september 2004 >

sql server full text search : NEAR operator


Bill D
9/23/2004 4:27:59 PM
What is the specific function of NEAR?
I'm indexing across 3 text fields and expect hits for 'white NEAR black' and
only getting a hit when the two words are in the same field, but not if they
are spread across two of the fields.

How NEAR does the other word have to be?

Hilary Cotter
9/23/2004 6:25:48 PM
Nearness is reflected in rank. The closer together two words are the higher
the rank everything else being equal.

Nearness is calculated on a per column basis, it cannot look across columns.
FreeText factors nearness into rank (everything else being equal) and can
look across columns. FreeText ignores the near operator however, as it is
calcuated in the rank.

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html


[quoted text, click to view]

Bill D
9/24/2004 10:27:28 AM
Very helpful. I had found that using Freetext instead of Contains was
getting me more results. Thanks Hilary.

[quoted text, click to view]

Bill D
9/24/2004 10:40:11 AM
Hilary, results do change when I use NEAR between words with Freetexttable.
In fact the returned set when I limit it to top 10 is quite different. I
think I can read into your statement below and sort of understand why the
difference. I need to take more time to look at my results and then check
them against the source data.

[quoted text, click to view]

Hilary Cotter
9/24/2004 11:51:41 AM
I'm sure they do change because now you are searching on the word near and
getting all the stems of the original search term!

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html


[quoted text, click to view]

AddThis Social Bookmark Button