Monday, December 19, 2005

How to use Microsoft Indexing Service?

Using Microsoft Indexing Service:

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.



You can create a new Catalg by Right Clicking the 'Indexing Service'. You can give a name to the catalog and browse to the folder which you want to be indexed by this catalog.



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=;Integrated Security .="}

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

6 comments:

Anonymous said...

Good design!
[url=http://oygpyhua.com/jswa/dbqp.html]My homepage[/url] | [url=http://hyhgekdn.com/vxql/nslr.html]Cool site[/url]

Anonymous said...

Well done!
My homepage | Please visit

Anonymous said...

Great work!
http://oygpyhua.com/jswa/dbqp.html | http://lvnjkwfb.com/yzlh/dbux.html

Anonymous said...

Good design!
[url=http://piupinxc.com/dtgq/vbkc.html]My homepage[/url] | [url=http://gqikvobk.com/ugxp/dikw.html]Cool site[/url]

Anonymous said...

Well done!
My homepage | Please visit

Anonymous said...

Nice site!
http://piupinxc.com/dtgq/vbkc.html | http://lejdhhlb.com/yadc/gnrg.html