-
Notifications
You must be signed in to change notification settings - Fork 0
Schema Changes
The plugin uses two variables extras_eov_restricted and extras_keyword_restricted
Without changing the CIOOS SOLR schema there are a few extra fields that allow placing custom fields into the database using dynamic fields
<dynamicField name="*_date" type="date" indexed="true" stored="true" multiValued="false"/>
<dynamicField name="extras_*" type="text" indexed="true" stored="true" multiValued="false"/>
<dynamicField name="res_extras_*" type="text" indexed="true" stored="true" multiValued="true"/>
<dynamicField name="vocab_*" type="string" indexed="true" stored="true" multiValued="true"/>
<dynamicField name="*" type="string" indexed="true" stored="false"/>
The wildcard field is not stored which leaves date, extras, res_extras and vocab_ as options
extras was chosen as it indicates the purpose and use of the fields (extra to the required fields)
However, it is a text field instead of string and gets tokenized, unlike the original eov and keyword fields
This means that there will be issues with using it for facets as it returns chunks of the text, rather than the full field. It may be possible to create a clone of the field with a String to get around this issue.
In the future, giving restricted_eov and keywords their own field may be useful. These would be index, stored and set as string type fields
Update 2022-06-29: Originally the fields were placed under 'res_extras'. Based on recommendations the restricted fields will be moved to 'extras_'
Right now the changes to cioos_siooc_schema.json involve copying the fields for 'keywords' and 'eov' and making another field for each.
These fields are the same as their originals except for the title and field name, as well as not being marked as required.
If any changes are made to either original field (say, more EOVs get added for example), the changes should be copied to the restricted version too
The blocks for the base variables should begin with the following as their first line
"field_name": "keywords"
"field_name": "eov"
-
Copy the entire block (contained within the curled braces) and paste them below the block with "field_name": "eov"
-
Change the field_names to 'extras_keywords_restricted' and 'extras_eov_restricted' respectively
-
Change 'required' to
false
, or add the line"required" : false
if the original block does not have an element for "required" -
For 'extras_eov_restricted' remove 'cioos_clean_and_populate_eovs' from the "validators" field