Windows Search Service を使用して、ドキュメントのメタ データをクエリして取得しますItemName
。
snip of the text
ユーザーにコンテキストを表示できるように、見つかったテキストを取得する方法はありますか?
string connectionString = "Provider=Search.CollatorDSO.1;Extended Properties=\"Application=Windows\"";
using (OleDbConnection connection = new OleDbConnection(connectionString))
{
string Query = @"SELECT System.ItemName, System.ItemPathDisplay, System.Title, System.ItemUrl FROM SystemIndex WHERE scope ='file:c:\Index' and FREETEXT('Happy')";
OleDbCommand command = new OleDbCommand(query, connection);
connection.Open();
....