Source code for creating/using ISearch Protocol, IURLAccessor, IFilter  
Author Message
nullity





PostPosted: Windows Desktop Search Development, Source code for creating/using ISearch Protocol, IURLAccessor, IFilter Top

Hello.

I am just a summer intern and I was assigned to research on how to add a new file type and how to index the database as well. I have given them the instruction on how to, but they want to have samples on how to implement the IFilter. I have searched the web, and was unlucky to find nothing.

Isn't there any template that we could follow to implement the Ifilter

Also, how could WDS perform a search in the database as well Is that where we need to create a new Store

I hope someone could help me.

Thanks,

Jamielyn




Windows Search Technologies1  
 
 
Paul Nystrom - MSFT





PostPosted: Windows Desktop Search Development, Source code for creating/using ISearch Protocol, IURLAccessor, IFilter Top

Hello Jamielyn,

There aren't any simple and easy IFilter templates as far as I know, but there are some pretty detailed instructions (including pseudo-code). You can find one example here:

http://msdn.microsoft.com/library/default.asp url=/library/en-us/odc_SP2003_ta/html/ODC_HowToWriteaFilter.asp frame=true

In what kind of database are you storing the files you are hoping to index Depending on your data store, you may also need to implement a protocol handler. In simple terms, a protocol handler understands and follows the rules of the data store that contains the files that need to be indexed.

Let's use the Windows file system as an example. Let's say you need to be able to index a new file type called .foo and that file type will be stored in a Windows file system. Well, first you'd need to write an IFilter that's capable of understanding the content of .foo and passing it to some kind of index. In addition, you'd need some way to get to files of type .foo. Since they're stored in a Windows file system you'd need something that could understand and navigate that file system for the IFilter so that it could index the files you want to be able to search. This is what your protocol handler does.

Of course, the above is an oversimplified explanation of a protocol handler. It should also be noted that the Windows file system protocol handler is included with the software. Still, you get the general idea. If you need to index files in a database or file system for which a protocol handler does not already exist, you will need to write one. You can find additional information about protocol handlers here:

http://msdn.microsoft.com/library/default.asp url=/library/en-us/spssdk/html/_introduction_to_a_protocol_handler.asp

Paul Nystrom - MSFT



 
 
nullity





PostPosted: Windows Desktop Search Development, Source code for creating/using ISearch Protocol, IURLAccessor, IFilter Top

tnx a lot. i think i understand how it works now.

But I am quite a newbie in C++ especially in implementing interfaces. Where do I actually find the header to include for the IsearchProtocol I know it is called searchapi.h, srchprth.idl, but where do I get it from Also, is it acutally possible to implement an interface using C++ I read that C++ doesn't have this functionality.

Sorry, but I'm still quite confuse. T

Thanks,

Jamielyn



 
 
Vikaskumar_09





PostPosted: Windows Desktop Search Development, Source code for creating/using ISearch Protocol, IURLAccessor, IFilter Top

Hello,

I'm a Software Developer (Trainee). I'm entrusted for "Incorporating Windows Desktop Search with the facility to index and crawl URLs". I found it really difficult, since am a fresher. I don't have much knowledge of these. Anyhow, I found stuffs like Isearch Protocol, IURLAccessor, IFilter, etc that'll fulfill my requirements. But, still I don't have idea, how to use these stuffs. 

 

Can anyone help me out. It's urgent...

 

Regards,

Vikas Kumar