Skip to content

WIP: Nested Documents UI (#3382)#3667

Draft
luis100 wants to merge 6 commits intodevelopmentfrom
feature/nested-documents-ui
Draft

WIP: Nested Documents UI (#3382)#3667
luis100 wants to merge 6 commits intodevelopmentfrom
feature/nested-documents-ui

Conversation

@luis100
Copy link
Copy Markdown
Member

@luis100 luis100 commented Apr 30, 2026

Summary

This PR implements UI support for Solr nested documents, enabling advanced search against child document fields (e.g. individual emails inside an EmailArchive AIP) while returning parent AIPs in search results.

Closes #3382

Phases

  • Phase 0 — EmailArchive nested-document metadata schema (XSLT crosswalk, Solr schema)
  • Phase 1 — Advanced AIP Search with nested filter groups (ParentWhichFilterParameter block-join)
  • Phase 2 — Virtual Catalogue list view (child documents rendered as IndexedAIP rows via ChildOfFilterParameter)
  • Phase 3 — History token wiring & deep-link support
  • Phase 4 — i18n coverage + test suite
  • Phase 5 — Documentation

Phase 1 detail

  • New nestedType / nestedParentType properties on SearchField (config-driven, no Java changes needed for new types)
  • SearchPanel.buildSearchFilter() groups nested fields by (nestedType, nestedParentType) and wraps each group in a ParentWhichFilterParameter
  • Three EmailArchive example fields registered in roda-wui.properties: emailSubject, emailSender, emailSentDate

Test plan

  • Start dev stack, ingest an EmailArchive AIP with nested email documents
  • Open advanced search, add "Email subject" field, enter a known subject — confirm parent AIP is returned
  • Confirm non-nested fields continue to work unchanged
  • Confirm WUI compiles cleanly (mvn -pl roda-ui/roda-wui -am gwt:compile -Pdebug-main)

🤖 Generated with Claude Code

luis100 and others added 6 commits April 30, 2026 14:11
Introduces the EmailArchive metadata type as the reference implementation
for Solr nested-document support in RODA — fully config-driven, zero Java.

- emailarchive.xsd: XML schema (parent mailbox + child email elements)
- emailarchive.xslt: ingest crosswalk producing nested Solr child docs via
  <field name="emails"><doc>…</doc></field> blocks; follows rakenskapsinfo pattern
- Register type in roda-wui.properties and i18n ServerMessages.properties
- EmailArchiveCrosswalkTest: 12 TestNG tests (full/minimal/no-emails fixtures)
  covering parent fields, date fields, child count, multi-value recipients,
  and absent-optional-field assertions

Part of: #3382

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds `nestedType` and `nestedParentType` properties to SearchField so
config-declared fields can carry a Solr block-join context.
`SearchPanel.buildSearchFilter()` groups all nested-type fields by their
(nestedType, nestedParentType) pair and wraps each group in a
`ParentWhichFilterParameter` — following the RepresentationInformation
pattern — instead of emitting flat filter parameters.

Config registers three EmailArchive child search fields
(emailSubject, emailSender, emailSentDate) as the reference example;
any future nested metadata type benefits automatically through
`roda-wui.properties` alone — no Java changes required.

Note: the implementation uses a `nestedType` property on SearchField
rather than the `nested_group` field type originally proposed in #3661.
This is simpler (no new GWT widget), equally expressive, and avoids
adding a UI rendering path that would be unused for all current types.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion crosswalk

Ingest XSLT now emits `title` (custodian name, emailAddress as fallback)
and a fixed `level = item` so emailarchive AIPs display correctly in the
browse list alongside other AIP types.

New HTML dissemination crosswalk renders all mailbox-level fields with
i18n labels and shows the indexed email messages as a compact table
(subject, sender, sent date, folder).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Format: "Custodian <email> (dateStart / dateEnd)"
Date range is omitted when both dates are absent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant