Montaque

Nothing is impossible for MS .NET

using the Indexing Service with .Net

What is the Indexing Service?

Microsoft Indexing Service is a service that provides a means of quickly searching for files on the machine. The most familiar usage of the service is on web servers, where it provides the functionality behind site searches. It is built into Windows 2000 and 2003. It provides a straightforward way to index and search your web site.

Setting up the Indexing Service is explained at windowswebsolutions.com and will not be covered here.

Connecting to the Indexing Service

The Indexing Service exposes itself to the developer as as ADO.Net provider MSIDXS with the data source equal to the indexing catalog name. For example, the connection string used in searching this site is

Provider="MSIDXS";Data Source="idunno.org";

As with any other ADO.Net provider you use the connection string property of the System.Data.OleDb.OleDbConnection object.

using System.Data.OleDb;
protected OleDbConnection odbSearch;
odbSearch.ConnectionString =
  "Provider= \"MSIDXS\";Data Source=\"idunno.org\";";
odbSearch.Open();
// Query and process results
odbSearch.Close();

You can also use the connection string in Visual Studio by dragging and dropping an OleDbConnection onto your asp.net page and setting the ConnectionString property in the Properties tab.

 

refer: http://idunno.org/dotNet/indexserver.aspx

Posted: Apr 01 2004, 08:32 AM by Montaque | with 6 comment(s)
Filed under:

Comments

Montaque said:

Just passing through...

Couple of things to keep in mind:

OleDb provider is a couple of notches slower than the COM object query. I still prefer OleDb because of the flexibility and "commonality" with other providers.

There are no stored procedures with Index Server, it's an ISAM store like VFP or Jet. Views exist, but I think they are more trouble than they're worth since they don't appear to run any faster than "straight" SQL through the OleDb provider.



# July 3, 2004 12:27 AM

Montaque said:

how can i create folder in index service from my program
# March 1, 2005 4:09 PM

Montaque said:

Is it possible to query a Indexing server on different machine from aspx page on different server? or is it possible to index directories on a network folder from the same machine as .net Application and use aspx to query indexing service.

Thanks
# March 25, 2005 6:38 AM

TrackBack said:

^_~
# April 16, 2005 2:39 AM

Montaque said:

I strongly recommend to use IXSSO COM instead of OLE DB Provider, in particular if you expect big volume of indexing documents. The reason- OLE DB Provider doesn't support MaxRecords restriction/select top in SQL. IXSSO COM object allows to implement paging.

See the code that I am using on my post http://www.thespoke.net/MyBlog/MNF/MyBlog_Comments.aspx?ID=92495.
# May 26, 2005 9:36 PM

Montaque said:

Hi guys,

I am using MSSEearch feature that incoperate with IIS. Problem is when I given criteria to search for C++ or C#, system is removing ++ and # from search criteria.

The criteria shown as header is showing as "C " or "VC " instead
of "C++" or "VC++". It is also highlighting the phrase "C" or "VC" instead of "C++" or "VC++", in the Query Result screen, which is wrong as to the search criteria.

Here is the example link for you: (though you cannot access but for reference)

http://192.168.2.4/null.htw?CiWebHitsFile=%2FTemp%2FBENE59591Resume%2Edoc&CiRestriction=%28%40CONTENTS+%28%22c++%22%29%29&CiBold=True&CiHiliteType=Full

output

"(@CONTENTS ("c "))" in

/Temp/BENE59591Resume.doc

....... text truncated .......

Amit

# September 22, 2005 1:55 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)