Implementing ISearchProtocol

Implementing ISearchProtocol

The ISearchProtocol interface provides methods for invoking, initializing, and managing UrlAccessor objects. ISearchProtocol methods are called by the Filter Daemon. The Filter Daemon processes URLs from the Gatherer.

After the protocol handler is CoCreated, the Init method is called to perform any initialization specific to this protocol handler. The parameter passed to the protocol handler can be cached during initialization. Because the Filter Daemon may unexpectedly terminate before calling Shutdown, protocol handlers with persistent information, such as temporary files and registry entries, should do an initial clean up in this method before starting the current instance.

The CreateAccessor method is called on the protocol handler to create and initialize a UrlAccessor object that will be used to process items in the content source. Protocol handlers that perform incremental updates should return PRTH_S_NOT_MODIFIED in the CreateAccessor method to flag items that have not been modified since the last incremental crawl. Note that this does not apply to container items, such as folders.

The implementation of the ISearchProtocol interface must ensure that the protocol handler can handle up to 32 simultaneous instances of IUrlAccessor.

Implementing IUrlAccessor