Currently this display_subtype field gets calculated in the search-api during indexing runtime for each entity (except Collection). By moving the logic to entity-api, we'll be able to take advantage of entity caching thus reduce the number of unnecessary calculations.
AFTER implementing the new featured described in #630, add a new field display_subtype in schema yaml based on the following rules:
Donor: fixed value "Donor"
Upload: fixed value "Data Upload"
Dataset/Publication: generated by on_index_trigger from dataset_type value
Sample: generated by on_index_trigger. When sample_category == "organ", use organ code. Otherwise, capitalize('sample_category')
Currently this
display_subtype
field gets calculated in the search-api during indexing runtime for each entity (except Collection). By moving the logic to entity-api, we'll be able to take advantage of entity caching thus reduce the number of unnecessary calculations.AFTER implementing the new featured described in #630, add a new field
display_subtype
in schema yaml based on the following rules:on_index_trigger
fromdataset_type
valueon_index_trigger
. Whensample_category == "organ"
, useorgan
code. Otherwise,capitalize('sample_category')