You can add two kinds of entries to your thesaurus:

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

Attribute

Value

ecr:type

Thesaurus. Required.

ecr:createDate

The date and time when this item was created, in the following format: yyyy-MM-dd'T'HH:mm:ss.SSXS. Optional.

thesaurus-entries

One or more thesaurus entries. Each entry has the following attributes:

Type (string, required). The supported values are:

one-way: Specifies a single thesaurus entry for the searchTerms value. If entered as a search term, a searchTerms value matches the synonyms value; but a synonyms value, if entered as a search term, does not match a searchTerms value.

multi-way: Specifies a list of synonyms, any one of which, if entered as a search term, matches any of the other synonyms.

searchTerms (string) Required if the Type value is one-way. Not used if the entry type is multi-way.

synonyms (string or string[], required). The synonyms values are treated in the following ways:

If type is one-way, the synonyms value is a single word or phrase that is considered a match for the searchTerm value.

If type is multi-way, the synonyms value is a set of two or more words or phrases, any one of which is considered a match for any of the others when entered by the user as a search term.

Example: add two entries to thesaurus

The following JSON adds two thesaurus entries to the thesaurus: a one-way entry that configures “digital” as a searchTerms value and “digi” as a synonyms value; and a multi-way entry that configures “adapter”, “converter”, and “adapter-converter” as synonyms of each other.

{
  "ecr:type" : "thesaurus",
  "thesaurus-entries" : [
   {
      "type": "one-way",
      "searchTerms": "digital",
      "synonym" : [
       "digi"
      ]
    },
    {
      "type": "multi-way",
      "synonyms": [
        "converter","adapter","adapter-converter"
      ]
    }
  ]
}

Thus:


Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices