Getting context around search string in results from Windows Search
I have code in my project that uses Windows Search to look through file contents for a string I provide. SELECT System.ItemName, System.ItemType, System.Search.Rank FROM SYSTEMINDEX WHERE SCOPE='file:C:/NiftyFolder' AND CONTAINS(System.Search.Contents,'"SEARCH STRING"') I get the proper search results but I'd like to go a step further and get the context around my search string. I'm showing the search results on a webpage and ideally, I'd like something similar to what you get in Windows when you have the proper iFilters installed. I've got the file type, path, and name but is there a System.?