Documentation Center

Excluding fields from being sent to OpenSearch

The <ExcludeFields> element in the server-side configuration file smarttarget_conf.xml specifies the Schema fields, Metadata Schema fields, and Embedded Schema fields you want to exclude from being published to OpenSearch.

About this task

You define the structure of content for Components, Multimedia Components, Metadata, and Embeddable Schemas in Tridion Sites using XML Schemas. When content is deployed to OpenSearch, the list of <ExcludeFields> is checked to see whether or not a field should be added to the resulting OpenSearch XML generated from the transport package.

The <ExcludeFields> section contains one or more Schema subsections. The following sample shows the structure:
<ExcludeFields>
  <Schema Id="SchemaID">
    <Field>value</Field>
    <MetadataField>value</MetadataField>
    <EmbeddedField SchemaFieldName="XMLName">value</EmbeddedField>
    <EmbeddedMetadataField SchemaFieldName="XMLName">value</EmbeddedMetadataField>
  </Schema>
</ExcludeFields>
where:
  • SchemaID is the ID of the Schema, as found in the middle of the Schema's Content Manager URI. For example, the ID of the Schema with the Content Manager URI tcm:7-212-8 is 212. The Schema ID refers to the Schema in whichever Publication it occurs, and so you are excluding the Schema in all those Publications.
  • XMLName is the XML name of the Schema (Metadata) Field, that is, the XML Name property of the Schema Field as found in Content Manager Explorer.

<ExcludeFields> can contain multiple <Schema> elements:

<ExcludeFields> Child ElementDescription
<Schema>The Content Manager URI of the Schema in the Uri attribute.

The <Schema> can contain the following elements:

<Schema> Child ElementsDescription
<Field>The XML name of the Schema field you want to exclude.
<MetadataField>The XML name of the Metadata field you want to exclude.
<EmbeddedField>In the SchemaFieldName attribute, specify the XML name of the Schema field that contains the Embedded Schema, and then specify the XML name of the field in the Embedded Schema you want to exclude.
<EmbeddedMetadataField>in the SchemaFieldName attribute, specify the XML name of the Metadata Schema field which contains the Embedded Schema and then specify the XML name of the field in the Embedded Schema you want to exclude.

Procedure

  1. Open the smarttarget_conf.xml configuration file.

    The file is used in several locations in your installation: Where to find smarttarget_conf.xml

  2. In the <ExcludeFields> section, exclude fields as follows:
    Excluding Schema fields
    In the following example, the Description field in the Schema with ID 320 is excluded:
    <ExcludeFields>
         <Schema Id="320">
             <Field>Description</Field>
         </Schema>
    </ExcludeFields>
    Excluding Metadata Schema fields
    In the following example, the DummyText Metadata field in the Schema with ID 320 is excluded:
    <ExcludeFields>
         <Schema Id="320">
             <Field>Description</Field>
             <MetadataField>DummyText</MetadataField>
         </Schema>
    </ExcludeFields>
    Excluding Embedded Schema fields
    Embeddable Schemas define a series of fields that you can use in other Schemas. A common example of an Embeddable Schema is Address containing fields such as Street, House Number, Zip Code, City, Country. A Schema such as Order could use the Address Embeddable Schema for its fields: Billing Address and Delivery Address.
    In the following example, the Street Embedded Schema field is excluded, but only for the Billing Address field (the Street Embedded Schema field for Delivery Address field would be included):
    <ExcludeFields>
         <Schema Id="320">
             <Field>Description</Field>
             <MetadataField>DummyText</MetadataField>
             <EmbeddedField SchemaFieldName="BillingAddress">Street</EmbeddedField>
             <EmbeddedMetadataField SchemaFieldName="Details">Notes</EmbeddedMetadataField>
          </Schema>
    </ExcludeFields>
    In the following example, assuming <Schema Id="318"> refers to the Embeddable Schema Address, the Street Embedded Schema field would be excluded from all content sent to OpenSearch:
    <ExcludeFields>
         <Schema Id="318">
             <Field>Street</Field>
          </Schema>
    </ExcludeFields>
  3. Save and close smarttarget_conf.xml.