Hierarchical Data to DDF Taxonomy
Design discussion on how to handle hierarchical data structures to DDF taxonomy mappings. The DDF taxonomy currently is intentionally a flat data structure. External systems may use a hierarchical data structure to represent their data, but needs to be mapped into the DDF taxonomy for discovery.
node/1/id
node/1/startTime
node/1/endTime
node/2/id
node/2/startTime
node/2/endTime
Challenges
- Data should be grouped and displayed in a user-friendly format in the Catalog UI.
- Queries need to use the data relationships (e.g. – (Not CQL) → anyText=houses and test/alternate-id contains '123' and test/startTime after 'Jan 1 2017' and test/endTime before 'May 1 2017')
Solr Capabilities
- Graph (https://cwiki.apache.org/confluence/display/solr/Graph+Traversal) - Only supported with SolrCloud
- Join (https://wiki.apache.org/solr/Join) - Only supported in single instance Solr nodes and not supported with SolrCloud
- Nested Documents (https://lucene.apache.org/solr/guide/8_1/searching-nested-documents.html & https://lucene.apache.org/solr/guide/8_1/indexing-nested-documents.html#indexing-nested-documents) - Solr 8.1 adds support for partial/atomic updates to nested documents
Potential Options
Option | Pros | Cons |
---|---|---|
Delimiter option alternateId=NRO;MyDoc;20170404T04:04:04Z;1234-1234Z |
|
|
Positional option (temporalCoverage.dateStart[4] corresponds to temporal Coverage.dateEnd[4]) |
| |
Metacard encoding (Contact[0] = metacard4321-4321-4321-4321-4321-4321-4321-4321 |
|
|
Via Associations (an associated metacard contains the contact information in a contact metacard) |
|
|
Store these types of data as XML. |
|
|
Create a Collection Attribute type that contains a collection of other element types. Possibly serialize this type as XML. | ||
Solr Nested Document |
|
|