Skip to content

Operators

Rincy Mathew edited this page Jan 18, 2023 · 19 revisions

SAGE's Operators are used to manipulate the data contained in Solr fields during a Job to ensure the desired values are written to the target Solr Core.

Operator management is handled on the "Operator Management" tab of the administration second of CAP's user interface.

Mapping Operator

The Mapping Operator is useful for transforming a list of initial values in a field into a list of corresponding mapped values.

An example scenario would be if a field contained the 3 digit ISO code of languages in a abbreviated form and you would like to convert them into full plain text in English.

Initial Value Mapped Value
eng English
fre French
ger German
spa Spanish

For detailed view of the list, please Click Here - ISO Codes List

Creating a Mapping Operator

To create a new Mapping Operator, click the "New" button while on the Operators tab of the management view. This would launch a create modal as shown

Example: Translating ISO language code to plain English in the following steps:

  • Name: Type a label for the operator to be created.
  • Type: Choose a MappingOp value from the dropdown
  • Field: Choose the option Language(dc.language, dcterms.language) from the dropdown
  • Mapping: Enter the 3 letter ISO code and the corresponding language in plain English text

    eng-> English and click on the Add button - this will ensure the mapping is persisted The Remove button will remove an remove the mapping entry

  • Once the desired mappings are entered, click on the Create button to create the Operator
SAGE_ISO_LANG_OP

Updating an Existing Mapping Operator

  • Clicking on the pencil icon on the right would pop up an edit modal.
  • In case a new mapping record has been added, clicking on the Add button would ensure the persistence of the data.
  • Click on the Update button to save the changes made to the Operator.
  • Clicking on the Cancel button would not be saving any changes entered in the modal.
Update_operator

Deleting an existing Mapping Operator

  • Clicking on the delete icon would pop up a Confirm Modal to ensure the deletion of the Mapping Operator
Delete_Operator