Registering third party IFilters in WSS/MOSS 2007


STEP 1: COM REGISTRATION


1.Add Registry key:
HKEY_CLASSES_ROOT\CLSID\<ComClassIdOfTheIFIlter\InprocServer32
                Default : <IFIlterDllPath>
                ThreadingModel : Both


STEP 2 : REGISTER IFILTER WITH OS


There are 4 steps to registering the filter-extension mapping with OS:


1. HKEY_CLASSES_ROOT\<.ext>\(Default) –> <TypeName>
2. HKEY_CLASSES_ROOT\<TypeName>\(Default) –> <StorageGUID>
3. HKEY_CLASSES_ROOT\<StorageGUID>\PersistentHandler\(Default) –> <PersHandlerGUID>
4. HKEY_CLASSES_ROOT\<PersHandlerGUID>\PersistentHandler\PersistentAddinsRegistered\IID_IFilter\ (Default) –>  <IFilterCLSID for .ext>



Now we’re all set to regiter our product with WSS (Windows Sharepoint Services) or MOSS( Microsoft Office
Sharepoint Server).


STEP 3: REGISTER FILTER EXTENSION WITH MOSS


1. Add the filter-extension to the File types crawled:
   Start -> Program -> Microsoft Office Server -> SharePoint 3.0 Central Administration  -> <Name of SharedService Provider> -> Search Settings -> File Types -> New File Type (Add extension here)


2. Add the following registry keys:


 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office    Server\12.0 \Search\Applications\<Site>\Gather\Portal_Content\Extensions\ExtensionList]
        <add extension to the list>


 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\Filters\.ext]
        Default = (value not set)
        Extension = <ext>
        FileTypeBucket REG_DWORD = 0x00000001 (1)
        MimeTypes = <application>       


 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office
 Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.ext]
        Default REG_MULTI_SZ = IFIlter CLASSID


3. Finally, recycle the Search Service by executing the following command from the command window:


   D:\> net stop osearch


   D:\> net start osearch


————————————————————————————————————————————-


If You’re using WSS, follow these steps instead:


STEP 3:  REGISTER FILTER EXTENSION WITH WSS


1. Add the following registry keys:
 
 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server  Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.<ext>]
        Default REG_MULTI_SZ = IFIlter CLASSID


 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server  Extensions\12.0\Search\Setup\Filters\.<ext>]
        Default = (value not set)
        Extension = <ext>
        FileTypeBucket REG_DWORD = 0x00000001 (1)
        MimeTypes = <application>


 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Applications\<Site  GUID>\Gather\Search\Extensions\ExtensionList]
        <add extension to the list>


2. Finally, recycle the Search Service by executing the following command from the command window:


   D:\> net stop spsearch


   D:\> net start spsearch 


================================================================================


Note: An official document will follow shortly on MSDN.

Comments (22)

  1. Rob S. says:

    Any chance this walk through could be dummed down for the rest of us?

    I think I know what to do in step one.  I think I know what to do for part one of step 2, but from there on in I am lost lost lost.

    Thanks in advance for any advice.

  2. debh says:

    Rob, are you using WSS or MOSS? Also, can you specifically point out which part you’re having trouble with?

  3. John Nicholl says:

    Hi,

    I am having real problems with pdf Ifilter (I have tried no others yet)

    I have WSS 3.0

    The Extention List in the registry is replaced on every server re-boot thus eliminating my new pdf extention

    I can’t figure out what is over-writing the registry any thoughts?  (much appreciated)

  4. debh says:

    John,

    This is the first time someone reported this – can you please email me a screenshot of the reg key you’re setting?

    -Deb.

  5. yossi d says:

    hi

    I’m trying your beautiful code to create my own IFilter. I changed the dummy filter as you wrote in the comments.

    I registered the filter by using InstallUtil.exe and it looks good.

    (I’m running ‘ifilter explorer’ and my filter is there).

    The problem is, that the index service ignored the filter (it is not doing what I want it to do – for the test I returned dummy string as the document content) . I added a code to write a word to a text file in some methods to debug the filter. And the result is that if I’m putting the code in the constructor of the filter it succeeded, and writes a file. and if I’m putting the code into the method  InitializeChunks() or CreateChunks(), nothing happens.

    i will be very Grateful if you will help me to solve my problem.

    yossi d.

    yosss@otzar.co.il

  6. debh says:

    Yossi, if you’re referring to the IFilter skeleton posted by Marco, it should work.

    If it’s possible for you to post a snippet of your code, I can take a look at it.

    regards,

    Deb.

  7. Oleg says:

    "Note: An official document will follow shortly on MSDN"

    was such a document ever posted on MSDN (can’t seem to find it)?

    thanks

  8. debh says:

    Oleg, we haven’t published the document yet. It’s in the pipeline though.

    – Deb

  9. Stephan Mühlstrasser says:

    Deb,

    what I would be looking for is the official documentation for what you describe under "STEP 2 : REGISTER IFILTER WITH OS". I have a hard time to locate this in the MSDN library. Could you please give me a pointer to the documentation how to register an IFilter for the Indexing Service?

    Thanks

    Stephan

  10. debh says:

    Forgot to mention, WDS and indexing service

    uses the same registration model.

  11. Stephan Mühlstrasser says:

    Deb,

    thanks, that looks exactly like what I was looking for.

    Regards

    Stephan

  12. GildaShare says:

    Hi all!

    I’m really at the end of my wits!

    I need to install IFilter on a Server with MOSS 2007 + SP1. All the standard directives are not working. I still have this message in the Crawl Log:

    The filtering process could not process this item. This might be because you do not have the latest file filter for this type of item. Install the corresponding filter and retry your crawl.

  13. Marcovanschagen says:

    Hi,

    Just wondering: what is the IFilter’s file type?

    Before you start debugging, do a restart of the server to ensure all processes pick up the new settings. (very rough but may help)

    Your message ‘The filtering process could not process this item…’ sounds like our support heard from a customer. (In this case it even crashed the indexing process & server…! That is very rare.)

    We found out the file was corrupted. Try to open the file in the application it was intended for. If the file is corrupt, the error you are experiencing is normal. If this is the case for only one file, tell the user to revive/fix the file or to delete it.

    It is something different if it happens to all files. In that case, going by your description, MOSS seems to know to try and load the IFilter DLL; only it is unable to find the DLL or related support files. You may try to add the folders where the DLL is located to the system path, you may need a reboot to activate this for all processes.

    Alternatively, try the IFilter test tools to see if the IFilter is okay and the system knows where to find it. These tools may be installed with your SharePoint (Deb, you know where?), also some tools are installed with our IFIlter: http://www.dwgifilter.com

    Good luck,

    Marco

  14. GildaShare says:

    it’s the Adobe pdf ifilter (Adobe reader 8.0)

  15. debh says:

    If you installed SP1 after making the registry changes in MOSS to work with Adobe PDF, then you need to change the registry entries again.

    We have a predefined GUID for the PDF filter and even if you changed the entry in MOSS prior to SP1 installation, SP1 reverts the registry to our predefined GUID.

    I’d take a look at installing PDF filters v.8 as mentioned in this blog, modify the registry entries again and then restart the search service.

    HTH,

    Deb.

  16. GildaShare says:

    no, it’s not that. I installed sp1 previously.

    I also tried using Adobe 8 and 11 but still not working

  17. GildaShare says:

    After that change, anyway, something changed.

    Now files are still invisible but i don’t have the warning in the crawl log

  18. gabriella says:

    Anyone  knows if exists an I filter for ISO files?

    Thanks a lot,

    ga

  19. alexkiroffmsc says:

    Друзья!

    Поздравляю Вас с победой нашей сборной на Евро2008.

    Мы достойно выдержали это испытание и пусть Мы не чемпионы – все равно Мы лучшие!

    Россия ВПЕРЕД!!!

  20. Richard says:

    I’m following your steps to verify that the .msg iFilter is appropriately registered. Under HKCR I see the (Default) REG_SZ is set to Outlook.File.msg. Looking up this <TypeName> I see that the (Default) REG_SZ is ‘Outlook Item’ instead of a GUID. Any thoughts?