Want to add document search in your application, you can use microsoft indexing service to do that. You can create a Catlog in the Microsoft indexing service on the folder whose document you want to search from your application. I will guide you on how to use microsoft indexing service from your ASP.NET page.
Go to Computer Management->Services and Application->Indexing Service and make sure that it is running.
MS Indexing Service + ASP.NET
Creating an ASP.NET page that can query from the MS Indexing service, I will use the 'Web' catalog that is created by deafult by the indesing service on the 'c:\inetpub\wwwroot\' folder.
We can connect to the MS Indexing service through the following Connection String {"Provider=\"MSIDXS.1\";Data Source=
You can select the Name of the File, the path where it is located and some of the text from the file. {Select FileName,Path,Characterization from Scope()}
Code:
protected System.Data.OleDb.OleDbConnection oleDbConnection1;
this.oleDbConnection1.ConnectionString = "Provider=\"MSIDXS.1\";Data Source=Web;Integrated Security .=";
{You can change the 'Data Source' to the name of the catalog in which you want to search}
protected System.Data.OleDb.OleDbCommand oleDbSelectCommand3;
protected System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter2;
this.oleDbSelectCommand3 = new System.Data.OleDb.OleDbCommand();
this.oleDbDataAdapter2 = new System.Data.OleDb.OleDbDataAdapter();
Sample Project:
Sample ASP.NET Project