gbif / pipelines

Pipelines for data processing (GBIF and LivingAtlases)
Apache License 2.0
40 stars 28 forks source link

Event UI relies on a concatenated version of lineage #1072

Open MortenHofft opened 2 weeks ago

MortenHofft commented 2 weeks ago

ping @djtfmartin and @fmendezh

In the ALA colaboration we added a nice feature that displayed the structure of a dataset or event. To do that we used concatenated versions of eventTypes and events.

eventTypeHierarchyJoined + eventHierarchyJoined is what we called them in the ALA colaboration. Indexed as keyword.

We use this to generate trees showing the dataset or event layout


Event A
├─ event a
├─ event b
│  ├─ event b1
│  ├─ event b2
├─ event c
│  ├─ event c1
│  ├─ event c2

We can do that because a term aggregation on eventTypeHierarchyJoined will return (/) being a reserved string

Event A / event a
Event A / event b / event b1
Event A / event b / event b2
...

better example for event Type would be Survey / Site / Report

djtfmartin commented 2 weeks ago

The related code on the ALA version of the ParentJsonConverter is here:

https://github.com/gbif/pipelines/blob/dev/livingatlas/pipelines/src/main/java/au/org/ala/pipelines/converters/ALAParentJsonConverter.java#L194