Specify MIME Types for Content Indexing
As an administrator, you can select what object content formats (MIME types) should be indexed when indexing is triggered.
For example, Windchill documents can contain data in many different formats, including Microsoft Word files (.doc or .docx extension), Microsoft Excel spreadsheets (.xls or .xlsx extension), and PDF files (.pdf extension). You can customize Windchill Index Search so that the content of Microsoft Word files and PDF files are indexed, but Microsoft Excel spreadsheets are not.
* 
The MIME types should be specified during the initial setup of Windchill bulk indexing or before the indexing operation is performed.
If the MIME types are modified, the data should be re-indexed. For more information, see Bulk Index Tool.
Currently Indexed MIME Types
To obtain the list of MIME types for which file content is indexed, execute the following command in a Windchill shell:
windchill wt.content.DataFormatUtil -list
The returned list includes blocks of information about the MIME types defined in Windchill. For example, the following information is supplied for Microsoft Visio content:
------------------------------
formatName = Microsoft Visio
mimeType = application/visio
description = Microsoft Visio Drawing
indexable = true
icon = netmarkets/images/ms_visio.gif
extensions = VSD VST VSS
------------------------------
To index content for the MIME type, indexable must be set to true.
For information on the default file extensions compatible with Windchill content indexing, see Supported File Types for Content Indexing.
Modify an Existing MIME Type
To change the indexable value of a MIME type, you can use the -update command.
1. Execute the following command in a Windchill shell:
windchill wt.content.DataFormatUtil -update
2. You are prompted for the format name of the MIME type you want to update. Refer to the formatName value displayed when running the -list command.
3. When you enter the format name, you are presented with a series of prompts.
For example, the following output is displayed when disabling indexing for Microsoft Visio documents:

Enter name of mime type that you want to update(i.e. Microsoft Word): Microsoft Visio

Updating format ...
formatName = Microsoft Visio
mimeType = application/visio
description = Microsoft Visio Drawing
indexable = true
icon = netmarkets/images/ms_visio.gif
extensions = VSD VST VSS

Would you like to substitute the current list of extensions with a new one ? (Y/N): N

Enter a space seperated list of the valid file extensions to add for this MIME (i.e. doc wiz) (blank to leave as is):

Enter the actual mime type (i.e. text/plain) (blank to leave as is):

Enter description of mime type (blank to leave as is):

Is this mime type indexable? (Y/N) (blank to leave as is): N

Enter the path to the icon file (i.e. wt/clients/images/generic.gif)(blank to leave as is):



Would you like to continue updating data formats (y/n) : N
Add a MIME Type
If you want to index the content of a file type not already listed, you can add a new MIME type.
1. Execute the following command in a Windchill shell:
windchill wt.content.DataFormatUtil -add
2. Enter the information requested in the displayed commands prompts.
For example, the following commands add the OpenOffice spreadsheet MIME type, and makes it indexable:

Enter name of mime type (i.e. Microsoft Word) (REQUIRED): OpenOffice Spreadsheet

Enter a space seperated list of the valid file extensions for this MIME (i.e. doc wiz) (REQUIRED): SXC

Enter the actual mime type (i.e. text/plain) (REQUIRED): application/vnd.sun.xml.calc

Enter description of mime type: OpenOffice Calc Spreadsheet

Is this mime type indexable? (Y/N): Y

Enter the path to the icon file.
This should be under your Windchill codebase(i.e. wt/clients/images/generic.gif) (REQUIRED): images/file_sxc.gif



Would you like to continue entering new Mime types to the System (y/n) : N
Verify That the File is Indexable
After you add a MIME type, you should verify that Windchill Index Search can index the file content.
1. From the machine on which the index search server is installed, open a command prompt and execute the following to set the classpath:
set classpath=<INDEX_SEARCH_HOME>\solr\server\lib\ext\*;<INDEX_SEARCH_HOME>\solr\server\solr-webapp\webapp\WEB-INF\lib\apache-tika-standalone.jar
2. Next, run the following command:
java org.apache.tika.cli.TikaCLI "<filepath>"
where <filepath> is the path to a file in the specified file format. For example:
java org.apache.tika.cli.TikaCLI "C:\Documents\MyCalc.sxc"
If you get an error message, the file content cannot be indexed.
도움이 되셨나요?