Public JSON Formats for
Thesaurus
This section
describes the public JSON formats of Thesaurus configuration.
Properties in the JSON file:
Attribute
|
Value
|
---|
ecr:type
|
thesaurus
|
ecr:createDate
|
yyyy-MM-dd'T'HH:mm:ss.SSSX.
Optional. Date and time that this item was created. Defaults to creation date
of the JCR.
|
thesaurus-entries
|
One or more entries. Each
entry has the following attributes:
|
Attribute
|
Type
|
Required
|
Value
|
type
|
string
|
yes
|
one-way:
Specifies a single synonym for the searchTerms value. The word configured as
the searchTerm matches the synonym wherever it occurs in your records. However,
a word configured as a synonym, if entered as a search term, will not match the
word configured as a search term.
multi-way:
Specifies a list of synonyms, any one of which, if entered as the search term,
will match any other synonym wherever it occurs in your records.
|
searchTerms
|
string
| |
Required if the type value is one-way. Not
used if the entry type is multi-way.
|
synonyms
|
string or string[]
|
yes
|
If type is
one-way, a single string that is considered a match for the searchTerm value.
If type is
multi-way, a set of two or more strings, any one of which is considered a match
for any of the others when entered by the user as a search term.
|
The following example illustrates the exported JSON format for a
one-way thesaurus entry (the search term "digital" matches "digi" in your
records), and a multi-way thesaurus entry ("converter", "adapter", and
"adapter-converter" all match each other):
{
"ecr:type" : "thesaurus",
"ecr:createDate": "2015-08-11T14:57:36.766Z",
"thesaurus-entries" : [
{
"type": "one-way",
"searchTerms": "digital",
"synonyms" : [
"digi"
]
},
{
"type": "multi-way",
"synonyms": [
"converter","adapter","adapter-converter"
]
}
]
}