基本自訂 > User Interface Customization > Windchill Search Customization > Enabling Text Preview Column for Additional Objects
  
Enabling Text Preview Column for Additional Objects
The Text Preview column is useful to view the keyword as it appears in the text. This column is available in the Search Results table when performing keyword searches. By default, you can configure the display of the Text Preview column for document type of objects in the wt.index.enableTextPreview property. To enable the display of the Text Preview column for other types of data objects, perform the following steps:
1. Edit the property wt.index.supportedTypesForTextPreview in site.xconf to add the internal name of the content holder object type for which you want to enable the Text Previewcolumn. For example, to enable Text Preview for parts, add wt.part.WTPart in site.xconf.
* 
The WTPart object is not a default content holder. To enable support for attachment on parts, the Attachment on Parts preference must be set to Yes. This preference is available under Part Management in the Preference Management.
2. Run xconfmanager -p to propagate the changes.
3. Override the getSpecialTableColumnsAttrDefinition method to add the Text Preview column. For example, if you want to add the Text Preview column to part related searches, override getSpecialTableColumnsAttrDefinition method in WTPartResultTableView class. A sample code is shown below:
public List getSpecialTableColumnsAttrDefinition(Locale locale) {
List result = new ArrayList();
//Add Teaser Column
if(isSolrInstalled()){
result.add(new Attribute.TextAttribute(“Text Preview”));
}
return result;
}
After performing the above steps, Text Preview column will be added as part of custom table view.
4. Set the value of the property wt.index.enableTextPreview to true to enable the Text preview column.
5. Re-index the existing data.
Windchill Search Customization