I am trying to determine all the possible words that are next to a word in a column that has a full text index on it.
I am using sys.dm_fts_index_keywords to get all the possible keywords ignoring all the words in the stoplist.
An example of what I’m trying to figure out:
If I have the string: “I like the cafe at my office” and I am looking at the word “cafe” I would like to know the words next to it are.
It doesn’t matter if I include stop list words or not when I’m doing the next to search. I just thought it would be easier to leverage the full text index that is already in place.
You can use the FT index to find the match, but then youll have to parse the phrase and find the adjacent words. Unfortunately, FTS doesnt give you the position of the match afaik, else this might be easier.
Here is an example setup: