You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the advanced search panel for AIPs (AdvancedSearchFieldsPanel) to support a new nested_group field type. This renders a collapsible "Contains X where…" block with sub-fields that compile into a ParentWhichFilterParameter — finding parent AIPs whose nested children match the given criteria.
Note
ParentWhichFilterParameter is already fully serializable and passes through the existing /api/v2/aips/find endpoint without any backend changes. This is a pure configuration + GWT client change.
Part of:#3382 Depends on:#3660 (Phase 0 — for the emailarchivecontent_type value used in the parent filter)
How Nested Filter Groups Work
When a user fills in fields inside a nested group and clicks Search, the panel builds:
This translates to a Solr block-join query that returns parent AIPs whose child email documents match the criteria. The result list continues to show IndexedAIP rows — the mailbox AIPs that contain matching emails.
Solr query generated (for reference)
{!parent which="content_type:emailarchive"} (subject_txt:quarterly AND sender_s:joao*)
privatebooleannestedGroup = false;
privateStringnestedParentFilter; // e.g. "content_type:emailarchive"privateList<SearchField> nestedFields; // sub-fields for the group
With corresponding getters, setters, and Jackson annotations.
1. getSearchFieldsFromConfig() — parse nested_group type
When a field has type = nested_group:
Set searchField.setNestedGroup(true)
Read nested_parent_filter value
Recursively parse the sub-fields listed in nested_fields (same property structure as regular fields, but prefixed under the group key)
2. Rendering — collapsible block
Render a nested group as a visually distinct collapsible block. When collapsed, shows "Contains email where…" label. When expanded, shows the sub-field rows (each using the standard field type renderers: text box, date picker, date interval, etc.).
3. Filter compilation on search
When the user clicks Search, detect which nested groups have at least one sub-field filled. For each filled group:
nestedParentFilter is stored as a raw Solr query string (e.g. content_type:emailarchive). It maps directly to ParentWhichFilterParameter.parentFilter as a SimpleFilterParameter. For the advanced search use case, only simple equality filters are needed as the block mask.
i18n Keys Required
ui.search.fields.IndexedAIP.email_nested_group = Contains Email where...
ui.search.fields.IndexedAIP.email_nested_group.email_subject = Subject
ui.search.fields.IndexedAIP.email_nested_group.email_sender = Sender
ui.search.fields.IndexedAIP.email_nested_group.email_sentDate = Sent Date
Overview
Extend the advanced search panel for AIPs (
AdvancedSearchFieldsPanel) to support a newnested_groupfield type. This renders a collapsible "Contains X where…" block with sub-fields that compile into aParentWhichFilterParameter— finding parent AIPs whose nested children match the given criteria.Note
ParentWhichFilterParameteris already fully serializable and passes through the existing/api/v2/aips/findendpoint without any backend changes. This is a pure configuration + GWT client change.Part of: #3382
Depends on: #3660 (Phase 0 — for the
emailarchivecontent_typevalue used in the parent filter)How Nested Filter Groups Work
When a user fills in fields inside a nested group and clicks Search, the panel builds:
This translates to a Solr block-join query that returns parent AIPs whose child email documents match the criteria. The result list continues to show
IndexedAIProws — the mailbox AIPs that contain matching emails.Solr query generated (for reference)
Configuration Schema
File:
roda-ui/roda-wui/src/main/resources/config/roda-wui.propertiesNew
nested_grouptype added toui.search.fields.IndexedAIP:Model Changes
File:
roda-common/roda-common-data/src/main/java/org/roda/core/data/v2/index/SearchField.javaAdd three new fields to the
SearchFieldPOJO:With corresponding getters, setters, and Jackson annotations.
AdvancedSearchFieldsPanel.javaChangesFile:
roda-ui/roda-wui/src/main/java/org/roda/wui/client/common/search/AdvancedSearchFieldsPanel.java1.
getSearchFieldsFromConfig()— parsenested_grouptypeWhen a field has
type = nested_group:searchField.setNestedGroup(true)nested_parent_filtervaluenested_fields(same property structure as regular fields, but prefixed under the group key)2. Rendering — collapsible block
Render a nested group as a visually distinct collapsible block. When collapsed, shows "Contains email where…" label. When expanded, shows the sub-field rows (each using the standard field type renderers: text box, date picker, date interval, etc.).
3. Filter compilation on search
When the user clicks Search, detect which nested groups have at least one sub-field filled. For each filled group:
Note
nestedParentFilteris stored as a raw Solr query string (e.g.content_type:emailarchive). It maps directly toParentWhichFilterParameter.parentFilteras aSimpleFilterParameter. For the advanced search use case, only simple equality filters are needed as the block mask.i18n Keys Required
Files to Change
roda-ui/roda-wui/src/main/resources/config/roda-wui.propertiesnested_groupconfig forIndexedAIProda-common/roda-common-data/.../data/v2/index/SearchField.javanestedGroup,nestedParentFilter,nestedFieldsroda-ui/.../client/common/search/AdvancedSearchFieldsPanel.javaParentWhichFilterParameter.propertiesfiles