views:

35

answers:

1

Hello Folks,

I have been reading the Full Text help files for CONTAINS, FREETEXT, CONTAINSTABLE and so forth on MSDN and elsewhere, but I am not able to find the solution I am looking for.

I would like to be able to query with the following criteria:

Example value: "The quick brown fox jumped over the lazy dogs."

Select * from MyText where CONTAINS(column, 'brown near lazy').

I want to be able to return results where the word brown is within an n number of words from lazy, so for example, brown is within 5 words of lazy.

Is this even possible with the full text search, and if so, can someone provide an example?

Thanks

+1  A: 

Based on this post i'd say it can't be done.

Excerpt:

you can't define the level of nearness, nor can you specify separation distance by word, sentence, paragraph, page, chapter or book the way you can in other Microsoft Search products. This was supposed to ship in SQL 2008 but was cut.

After 50 words of separation distance the contribution to rank is 0 but they will still show up in searches.

Abe Miessler
Thanks for the information. I am sad this can't be done.
Jason Heine