Adding attributes is based on mapping existing structure attributes onto the new ones – e.g case -> doc.region. The main script is called and work as follows: <corpname> <struct> <src_attr> <new_attrname> <map_file> [<tmpdir>]

e.g. corpname=biwec, struct=doc, src_attr=id, new_attrname=region and tmpdir is path to a directory that is used for saving temporary data (/tmp by default). map_file is a name of the file with mapping from src_attr (e.g. to new_attr (e.g. doc.gdex or doc.region) – the script expects TAB-delimited text file with one pair of attributes on each line. The script creates encoded data for the new attribute and copies them in the right place; then, the config file has to be manually modified to add the new attribute.

The script codes are attached to this page – both files must be placed in the same directory before running . They can also be found on loft servers, in /home/xkovar3/add_fields/src .

Attached scripts:

scripts_header_fields (zip archive)