Skip to content

Using displayFormat for displaying, indexing and searching compound field values #7856

@poikilotherm

Description

@poikilotherm

Context

Problem

  1. Currently, there is no possibility to define a composed view of a compound metadata field to influence the order and/or combination of the subfields or adding HTML tags.
  2. There is no option to search for composed values made up from the fields within the compound field via the name of the compound field. (example: you cannot search for author, only the authorName, etc)

We want users to input metadata with as much detail and structure as possible (controlling vocabularies, ...). Yet recipients think in bigger context/pictures, expecting composed views (both text or images like in #6289) and easier to memorize search tags (author, not authorName).

Examples

  • Composing operatingSystem as part of the CodeMeta MDB (Include CodeMeta schema out of the box #7844):
    • Consists of operatingSystemName (a CV) and operatingSystemVersion
    • Example: "Windows 10"
    • Enable searching for either
      1. operatingSystem:"Windows 10" or operatingSystemName:Windows AND operatingSystemVersion:10, but also
      2. allowing wildcards/regex (operatingSystem:"Windows.*") or
      3. specific searches like operatingSystemName:Windows AND (operatingSystemVersion:7 OR operatingSystemVersion:10)
  • Composing vocabulary terms ('TopicClassification', 'Keyword'), so that the term is displayed as a link leading to the vocabulary entry.

Proposal

  1. Reuse metadata block definition field displayFormat for compound fields, too.
  2. The given display format may contain references to subfields via their name, following the present style of using #subFieldName.
  3. The display format may make use of HTML tags to format the output
  4. Omitting a display Format makes the UI fallback to current behaviour
  5. The display format of the compound field is also used to index the value as a searchable text within Solr.
  6. Indexing removes any HTML tags.
  7. This is unrelated to API ingest or metadata exports (the composed field views are not exported or usable via the API to retain backward compatibility).

Extensions

  • Enable definition of "maps" inside the displayFormat, to lookup text parts from a subfields value (example: lookup a link prefix to generate a clickable author identifier, for example using the ORCID to link to https://orcid.org/..., but also usable for other types of identifiers.)
  • Create an extension of the MDB to define metadata exports of compound fields. This makes reuse of the subfields possible, if metadata export file schemas support only an aggregation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Proposals

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions