Getting context around the search bar in Windows search results

I have code in my project that uses Windows Search to view the contents of a file for the line that I am providing.

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 correct search results, but I would like to take one more step and get the context around my search bar. I show the search results on a web page, and ideally I would like something similar to what you get on Windows when you have the appropriate iFilters installed.

image showing context circled in orange

I have a file type, path and name, but there is a system. ??? who will get the text that was circled in orange in the image above?

Update : After a larger search, it seems like it is unavailable.

http://social.msdn.microsoft.com/Forums/en-US/windowsdesktopsearchdevelopment/thread/1879e40f-bbf3-4365-b8f9-e0190ef437b0

http://social.msdn.microsoft.com/Forums/en-US/windowsdesktopsearchdevelopment/thread/ddd38a26-30a8-48f5-b053-dcee01094e2b

Windows Desktop Search does not return QueryFocusedSummary

The closest thing is System.Search.AutoSummary , but it just returns the first 1000 or so text characters from the file.

+4
source share

Source: https://habr.com/ru/post/1396515/


All Articles