Skip to content

refactor: remove redundant fields from media library index to reduce size#313

Merged
kmurugulla merged 2 commits intomainfrom
indexclnp
Apr 3, 2026
Merged

refactor: remove redundant fields from media library index to reduce size#313
kmurugulla merged 2 commits intomainfrom
indexclnp

Conversation

@kmurugulla
Copy link
Copy Markdown
Contributor

@kmurugulla kmurugulla commented Apr 3, 2026

Summary

Reduces media library index size by ~40% by removing redundant fields (name, status, nameSource,
timestampSource, latestUsageTimestamp) and deriving them at runtime instead.

Index entries now contain only 10 essential fields: hash, url, originalPath, timestamp, user,
operation, type, doc, displayName, and modifiedTimestamp. The status field is derived from
doc via getItemStatus() (empty = unused, non-empty = referenced), and displayName replaces the legacy
name field.

Factory functions (createMedialogEntry, toExternalMediaEntry, toLinkedContentEntry) centralize entry
creation to ensure consistency. All UI features and filters continue to work identically with backward
compatibility for old indexes, but we can silently replace index with ?full=true.

Test URLs:

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented Apr 3, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@kmurugulla kmurugulla requested a review from amol-anand April 3, 2026 19:32
@kmurugulla kmurugulla merged commit 519f602 into main Apr 3, 2026
3 checks passed
@kmurugulla kmurugulla deleted the indexclnp branch April 3, 2026 19:50
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.

2 participants