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."
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?
asked Aug 05 '10 at 02:39 PM in Default
The explanation for NEAR in BOL states:
NEAR indicates the logical distance between terms, rather than the absolute distance between them.For example, terms within different phrases or sentences within a paragraph are treated as farther apart than terms in the same phrase or sentence, regardless of their actual proximity, on the assumption that they are less related. Likewise, terms in different paragraphs are treated as being even farther apart.
I understand this to mean that you cannot say how near a term may be. "Nearness" is a calculated value which you cannot override.
The only method that comes close is to use the ranking option. You use the
answered Aug 06 '10 at 01:47 AM