To broaden the search for product information that is performed when a shopper searches on a given term, you can specify one or more thesaurus entries for that term. The search results include matches on the thesaurus entries as well as on the search term.

Before you create thesaurus entries, you must first create a thesaurus. You then create one or more thesaurus entries in the thesaurus.

You can add two kinds of entries to your thesaurus:

or

The following table describes the JSON attributes that configure a thesaurus and thesaurus entries.

This section describes how to view, create, replace, and modify the thesaurus, either locally or remotely.

You can create and modify thesaurus configuration remotely using the Search and Navigation REST API .

To replace the current configuration of the thesaurus remotely, execute the following PUT request:

PUT http://host:port/ifcr/gsadmin/v1/Discover/thesaurus

Note: The PUT method can be used only in JSON format. For information, see Understand ZIP format and JSON format (remote access only).

For example, the following input to the PUT request above entirely replaces the existing thesaurus and all of its thesaurus-entry objects:

{
  "ecr:type": "thesaurus",
   
  "user_specified_id": {
    "ecr:type": "thesaurus-entry",
    "synonyms": ["opt"],
    "type": "one-way",
    "searchTerms": "optical"
  }
  // Other thesaurus entries
}

To replace a thesaurus-entry object remotely, execute the following PUT request:

PUT http://host:port/ifcr/gsadmin/v1/Discover/thesaurus/my-thesaurus-entry

To modify the current configuration of the thesaurus remotely, execute the following PATCH request:

PATCH http://host:port/ifcr/gsadmin/v1/Discover/thesaurus

Note: The PATCH method can be used only in JSON format. For information, see Understand ZIP format and JSON format (remote access only).

For example, the following input to the PATCH request above entirely modifies the thesaurus-entry object specified by user_specified_id:

{
  "ecr:type": "thesaurus",
   
  "user_specified_id": {
    "ecr:type": "thesaurus-entry",
    "synonyms": ["opt"],
    "type": "one-way",
    "searchTerms": "optical"
  }
}

If the thesaurus-entry with the ID "user_specified_id" does not exist, the thesaurus-entry configured by this input is added to the thesaurus.

If a thesaurus-entry with the ID "user_specified_id" already exists, this thesaurus-entry is updated with the new properties and values provided in this input.

To modify a thesaurus-entry object remotely, execute the following PATCH request:

PATCH http://host:port/ifcr/gsadmin/v1/Discover/thesaurus/my-thesaurus-entry


Copyright © Legal Notices