This section describes how to implement a custom document filter for file types that are not even supported by Sybase Search Content Adapter.
For a file system document store or a passive (Web) document store, implement your custom document filter by:
Adding the MIME type and extension of the new document file type in the MimeTypeMap.xml file.
Passing the new MIME type and extension to the correct Stellent filter in the DocumentFilters.xml file.
For a database document store, the default content-type detector is not capable of recognizing new document file types. For recognizing the new document file type, you can either:
Use the DOC_CONTENT_TYPE alias in your SQL query, which bypasses the content-type detector. See “Constructing an import SQL statement”.
or
Implement a new Java com.isdduk.io.ContentTypeDetector class and configure this class for using the DB-import SQL query statement. This example illustrates how to implement the new class:
The DB-import SQL statement checks the Java system properties to check if the default implementation has been overwritten. Open the Container.ID.xml file and include the following Java system property.
<SystemProperty name="omniq.import.db.detector" value="com.mycompany.MyContentTypeDetector" /> <SystemProperty name="omniq.import.db.detectorReadLimit" value="512" />
where com.mycompany.MyContentTypeDetector is the name of your new content-type detector class.
The detectorReadLimit is the number of bytes the content-type detector receives from each file, in order for it to determine the content type of the byte data.
Create a JAR file for the new class and copy the class
in install_location\OmniQ\lib.