Adding a New Search Field
PTC Arbortext Content Delivery has the following two types of search fields:
Term field
Full text field
Follow these steps to add a new search field:
1. If the desired search field does not exist in the Types/globalDefinitions.xml file, define the new search field by adding a new entry in the Search Attributes section of globalDefinitions.xml.
For example:
<SearchField Label="Region" Name="REGION" Length="20" Type="Term"/>
<SearchField Label="Load Date" Name="PubDate" Type="Date"/>
<SearchField Name="FULLTEXT_PARTNAME">
If you want to add a search field for a date, the required format in the repository: is YYYYMMDD, for example 20150729. Note that if the input document has some other date format, you must have XSL code that transforms the input format to the required format.
2. If desired search field does not exist in the type property, add the newly defined search 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 search fields:
<SearchField Name="REGION">
<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>
</SearchField>

<SearchField Name="FULLTEXT_REGION ">
<FullTextMapping XPath="region"/>
</SearchField>
3. If data is already loaded, re-index the data for new assets. Otherwise, follow the normal data loading process.
The PTC Arbortext Content Delivery interface global search usually returns results based on the FULLTEXT search field defined on individual types. If you want to add additional attributes to the existing global search, you must include the XPATH for the desired attribute or element from the source XML as a FullTextMapping element.
For example, assume you have the following source XML for a business object Part
<Part>
<partName>MY PART</partName>
<partNumber>PRT000012121</partNumber>
</Part>

<!--
As per following type definition of above source xml, you can only
search this Part through partName(that is MY PART) only. Not through
partNumber(PRT000012121)
-->
<SearchField Name="FULLTEXT_PARTNAME">
<FullTextMapping XPath="Part/partName"/>
</SearchField>

<!--
If you want to search based on partNumber then you must update the type
defintion for Part Object. And in type definition file, you must add xpath for
partNumber (Part/partNumber) in search field
mapping as defined below.
-->
<SearchField Name="FULLTEXT">
<FullTextMapping XPath="Part/partName"/>
<FullTextMapping XPath="Part/partNumber"/>
</SearchField>
Note that you can specify the entire source XML as a part of global search by passing the root element (*/*) as the XPATH for its full text search criteria. For example:
<SearchField Name="FULLTEXT">
<FullTextMapping XPath="*/*"/>
</SearchField>