次の方法で共有


How to crawl the content of file with the extension “.cs (C-Sharp)”?

C-Sharp is not a special file it can be read as a text  file. So crawling to this file you won’t require to add the special filter and you can use the same IFilter which used to crawl the text files ({4A3DD7AB-0A6B-43B0-8A90-0D8B0CC36AAB}). But the problem you will face in providing the MimeTypes for this extension. Behind the scene, protocol handler call the IFilter based upon the file MimeTypes, you can provide any text MimeType to call cs IFilter but the MimeTypes should be different from “text/plain”.I used the text/scriptlet”.

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)

File-Extension

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>

 

image

 

[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>

 

image

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office

Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.ext]

Default REG_MULTI_SZ = IFIlter CLASSID

image

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

net stop osearch

net start osearch

image

Note :- The content source should be network share. If you crawl the content from a document library you will face the “Content for this URL is excluded by the server because a no-index attribute.” warning at the time of crawling the content.

https://blogs.msdn.com/ifilter/archive/2006/11/20/registering-third-party-ifilters-in-wss-moss-2007.aspx

https://support.microsoft.com/default.aspx?scid=kb;en-us;970113&sd=rss&spid=12200