Adding a New Search Result Field
You can define search results by setting the result field definition. Follow these steps to add a new result field:
1. If the desired result field does not exist in the Types/globalDefinitions.xml file, define the new result field by adding a new entry in the ResultFields section of globalDefinitions.xml.
For example:
<ResultField Label="CustomeLabel" Length="255" Name="CustomeResultFieldName"/>
2. If desired result field does not exist in the type property, add the newly defined result field in the types of interest.
For example, for the following input data in the XML structure:
<Object>
<region>IN</region>
</Object>
You could add the following result field:
<ResultField Name="CustomeResultFieldName">
<FieldMapping TemplateID="ResultField_TYPENAME_Attribute " XPath=" Object ">
<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" Type=" XPath">
<xsl:value-of select="region"/>
</xsl:template>
</FieldMapping>
</ResultField>
3. You can update a result field name by adding a new attribute CustomerRsultFieldName in SearchQueryConfigs.xml located in this InS_SW\SW\Applications\Windchill.ear\codebase.war\com\ptc\sc\configs\searchQueryConfigs.xml file.
4. You can update a result field name by adding a new parameter CustomerRsultFieldName in searchConfig.xml located in InS_SW\SW\Applications\Windchill.ear\codebase.war\com\ptc\sc\configs\searchConfig.xml file.
5. If data is already loaded, re-index the data for new assets. Otherwise, follow the normal data loading process.
Was this helpful?