---
schema_version: "1"
id: 9eb0ab473f138c7608fcbf009f6e1c063923a3b006fbc0e9b3c95a037cd1ded2
title: Search Object Import and Export in B2C Commerce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_search_object_import_export.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_search_object_import_export.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 5be2d212061eb7185f95e416e3fa552cf22480895c0147c7a2690c19f7109757
description: Use the Search object to import and export search-related elements including stop words, search term completion suggestions, synonyms, hypernyms, redirects, searchable attributes, search preferences, and sorting rules.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Search Object Import and Export in B2C Commerce

Use the Search object to import and export search-related elements including stop words, search term completion suggestions, synonyms, hypernyms, redirects, searchable attributes, search preferences, and sorting rules.

## Search Object Schemas in B2C Commerce

The Search object uses several schemas including search2.xsd, preferences.xsd, and sort.xsd. The search.xsd schema was deprecated and replaced by the search2.xsd schema. The search.xsd schema remains for use with index stemmer or indexing mode.

This table describes the general purpose for each search schema.

 
| Schema | Purpose |
| --- | --- |
| search2.xsd | Use to import and export stop words, search term completion suggestions, synonyms, hypernyms, redirects, and searchable attributes. |
| preferences.xsd | Use to import and export search preferences. |
| sort.xsd | Use to import and export sorting rules and boost and bury rules. |
| search.xsd | This schema was deprecated and removed in 2011. The schema remains only to enable the import and export of index stemmer or indexing mode. |

The search2.xsd file doesn't support deprecated text relevance attributes and sorting attributes. To better understand the differences between the search.xsd and search2.xsd schemas, review the following table.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
          <colgroup>
            <col>
            <col>
            <col>
          </colgroup>
          <thead class="slds-text-title_caps ">
            <tr class="">
              <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d223409e136">Feature</th>
              <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d223409e139">search.xsd</th>
              <th scope="col" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" id="d223409e142">search2.xsd</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="Feature" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e136 ">Text relevance attributes</td>

              <td data-label="search.xsd" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d223409e139 ">
                <p>The <code>text-relevance-attributes</code> element is deprecated
                  and no longer supported.</p>
                <p style="margin-bottom:0;">It's ignored during import and export and replaced with searchable
                  attributes.</p>
              </td>

              <td data-label="search2.xsd" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d223409e142 ">
                <p>To import text relevance boosts, use the
                  <code>searchable-attributes</code> element. Text relevance
                  attributes are a deprecated feature.
                </p>
                <p style="margin-bottom:0;">The
                  <code>text-relevance-attributes</code> element isn't
                  included in the schema.
                </p>
              </td>

            </tr>
            <tr class="">
              <td data-label="Feature" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e136 ">Searchable attributes</td>

              <td data-label="search.xsd" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d223409e139 ">Not included.</td>

              <td data-label="search2.xsd" class="slds-cell-wrap" style="text-align:left;vertical-align:top;" headers="d223409e142 ">The <code>searchable-attributes</code> element is
                supported.</td>

            </tr>
            <tr class="">
              <td data-label="Feature" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e136 ">Sorting attributes</td>

              <td data-label="search.xsd" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e139 ">The <code>sorting-attributes</code> element is deprecated, but
                still supported.</td>

              <td data-label="search2.xsd" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e142 ">The <code>sorting-attributes</code> element isn't present in the
                schema.</td>

            </tr>
            <tr class="">
              <td data-label="Feature" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e136 ">Localization</td>

              <td data-label="search.xsd" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e139 ">In the search.xsd file, you must specify a locale for each object,
                such as a stop word.</td>

              <td data-label="search2.xsd" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e142 ">In the search2.xsd file, you can specify a locale for a group of
                metadata objects, such as stop words.</td>

            </tr>
            <tr class="">
              <td data-label="Feature" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e136 ">Settings</td>

              <td data-label="search.xsd" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e139 ">The <code>settings</code> element is still supported. The
                settings element configures the index stemmer and indexing mode.</td>

              <td data-label="search2.xsd" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e142 ">The <code>settings</code> element isn't included in the
                schema.</td>

            </tr>
            <tr class="">
              <td data-label="Feature" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e136 ">Incremental indexing and scheduled rebuild settings</td>

              <td data-label="search.xsd" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e139 ">
                <p>Not exported in the search.xml file from <strong class="uicontrol">Site Import &amp;
                    Export</strong>. </p>
                <p style="margin-bottom:0;">Not exported from <span class="menucascade"><strong class="uicontrol">Search</strong> | <strong class="uicontrol">Import &amp; Export</strong> | <strong class="uicontrol">Search Setting Export</strong></span>.</p>
              </td>

              <td data-label="search2.xsd" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e142 ">
                <p style="margin-bottom:0;">Exported from <strong class="uicontrol">Site Import &amp; Export</strong> and <span class="menucascade"><strong class="uicontrol">Search</strong> | <strong class="uicontrol">Import &amp; Export</strong> | <strong class="uicontrol">Search Setting Export</strong></span>.</p>
              </td>

            </tr>
            <tr class="">
              <td data-label="Feature" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e136 ">All other search features</td>

              <td data-label="search.xsd" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e139 ">
                <p>Not exported in the search.xml file from <strong class="uicontrol">Site Import &amp;
                    Export</strong>. The elements exported in search.xsd include
                  only those elements not supported in search2.xsd.</p>
                <p style="margin-bottom:0;">Not exported from <span class="menucascade"><strong class="uicontrol">Search</strong> | <strong class="uicontrol">Import &amp; Export</strong> | <strong class="uicontrol">Search Setting Export</strong></span>.</p>
              </td>

              <td data-label="search2.xsd" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e142 ">
                <p style="margin-bottom:0;">Exported from <strong class="uicontrol">Site Import &amp; Export</strong> and <span class="menucascade"><strong class="uicontrol">Search</strong> | <strong class="uicontrol">Import &amp; Export</strong> | <strong class="uicontrol">Search Setting Export</strong></span>.</p>
              </td>

            </tr>
          </tbody>
        </table>

## Search Preferences Schema Elements in B2C Commerce

Use the preferences.xsd schema for importing search preferences.

Search uses two schemas: search2.xsd and preferences.xsd. You use the search2.xsd schema for search configuration, and the preferences.xsd for importing search preferences.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
          <colgroup>
            <col style="width:39.0625%">
            <col style="width:60.9375%">
          </colgroup>
          <thead class="slds-text-title_caps ">
            <tr class="">
              <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d223409e385">Object Information</th>
              <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d223409e388">Details</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="Object Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e385 ">Schema file</td>

              <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e388 ">preferences.xsd</td>

            </tr>
            <tr class="">
              <td data-label="Object Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e385 ">Business Manager import and export location</td>

              <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e388 ">
                <p><span class="menucascade"><strong class="uicontrol"><var>site</var></strong> | <strong class="uicontrol"> Administration</strong> | <strong class="uicontrol">Site Development</strong> | <strong class="uicontrol">Import &amp; Export</strong></span> or include in </p>
                <p style="margin-bottom:0;"><span class="menucascade"><strong class="uicontrol"><var>site</var></strong> | <strong class="uicontrol">Administration</strong> | <strong class="uicontrol">Site Development</strong> | <strong class="uicontrol">Site Import &amp; Export</strong></span></p>
                <p style="margin-bottom:0;">.</p>
              </td>

            </tr>
            <tr class="">
              <td data-label="Object Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e385 ">Pipelets</td>

              <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d223409e388 ">N/A</td>

            </tr>
          </tbody>
        </table>

## Search Sorting Rules Object Import and Export in B2C Commerce

Use the sort.xsd schema to import sorting rules and dynamic attributes.

When using the sort.xsd schema, keep the following in mind:

- The `<sorting-rule-campaign-assignment>` element assigns a sorting rule to a campaign. If the specified campaign-ID doesn’t match a campaign ID, the system logs an error message and skips the element.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)
    
    Note Wildcard deletion isn't supported when mode=_delete_.
- B2C Commerce trims sorting rule IDs of leading and trailing white space before storing or exporting to XML. Correct any sorting rule IDs with leading or trailing white space before storing them. Though export trims ID white space, importing them again in merge mode results in added sorting rule IDs both with and without leading or trailing spaces.

 
| Object Information | Details |
| --- | --- |
| Schema file | sort.xsd |
| Granularity | Site-specific feature configuration. |
| Business Manager import location | **site** | **Administration** | **Site Development** | **Site Import & Export**and **Search** | **Import & Export** |
| Pipelets | N/A |

## Search2 Object Import and Export in B2C Commerce

Use the search2.xsd schema file to import information used to build search indexes.

### Search2 Object Schema Information in B2C Commerce

Use the search2.xsd schema file to import information used to build search indexes.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note The search2.xsd schema does not support some elements. However, you can still import these elements using search.xsd.

 
| Object Information | Details |
| --- | --- |
| Schema file | search2.xsd |
| Granularity | Site-specific feature configuration. |
| Business Manager import location | **site** | **Administration** | **Site Development** | **Site Import & Export** and **Search** | **Import & Export** |
| Pipelets | N/A |

### Search Hypernym Import and Export in B2C Commerce

The search2.xsd schema enables merchants to provide hypernyms.

A hypernym is a word with a broad meaning that more specific words fall under. For example, _color_ is a hypernym of _red_.

If the hypernym of a hypernym group is empty, the system issues a warning and skips the hypernym group. For example:

```markup
<hypernym-list xml:lang="x-default">
    <hypernym-rule>
        <hypernyms></hypernyms>
        <hyponyms> 1 </hyponyms>
    </hypernym-rule>
</hypernym-list>
```

In this example, the system provides the following error:

```markup
WARN [WARNING] [DATAERROR] Line: 201/Hypernym Group:Empty hypernym. Skipping hypernym group.
```

### Search Common Phrases Import and Export in B2C Commerce

The search2.xsd schema supports the import of common phrases.

Merchants can configure common phrases in multiple elements or as a comma-separated list in a single element. For example:

```markup
    <common-phrases xml:lang="x-default">
        <common-phrase match-mode="exact-match">ankle boots</common-phrase>
        <common-phrase match-mode="exact-match">red dress</common-phrase>
        <common-phrase match-mode="exact-match">infinity scarf, wool scarf</common-phrase>
    </common-phrases>
```

### Search Term Completion and Import and Export in B2C Commerce

Merchants can include and exclude search suggestions using the search2.xsd schema.

For example, you can exclude specific "bad words" from the search.

```markup
<suggestion-list xml:lang="x-default">
    <suggestions>foo bar</suggestions>
    <exclusions>bad-word, bad-word</exclusions>
</suggestion-list>
```

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note The preferences.xsd also supports a _SearchSuggestions_ preference.

### Search Refinements and Import and Export in B2C Commerce

Merchants can create refinement definitions for search through Business Manager, and use this information in product and content search indexing.

For product search refinements, the catalog.xsd represents the refinement definitions through the _refinement-definitions_ element, inside the complexType.Category.

For content search refinements, the library.xsd represents the refinement definitions through the _refinement-definitions_ element, inside the complexType.Folder section of the schema.