Skip to content

[EPIC] Content Drive: Search & Performance at Scale #36814

Closed
11 of 11 issues completed
Closed

Description

@fmontes

What we need

Content Drive has to stay fast and return the right thing on instances with millions of assets. Today it does neither.

  • Search and pagination can take up to seven minutes on large repositories.
  • Search returns results that don't contain the search term — searching IMG for a file named IMG_1004.jpg surfaces unrelated files such as og-preview.vtl.

Both hit the everyday path, not an edge case: browsing a folder, moving to the next page, typing part of a filename you know exists.

Why it matters

Content Drive replaced Site Browser and Content Search with one workspace. On a demo instance it behaves well. On a real enterprise repository it doesn't, and at that point the unified workspace is worse than the tools it replaced — at least Content Search came back quickly.

Seven minutes is past the point where a user assumes the page has hung. And once a result set contains entries a user can't account for, the whole result set stops being trustworthy — so they search again with different terms, which multiplies the cost of the slowness.

Asset filenames matter here specifically. They're a primary way people locate things, especially developers looking for VTLs, CSS, and theme files.

What "done" looks like

On an instance with millions of assets:

  • A user types a fragment and gets matching results in a time that feels interactive.
  • The fragment is found whether it lives in the filename, title, metadata, path, or URL — all five.
  • Every returned result visibly relates to what was typed, and it's clear which field matched.
  • Paginating through a large folder is equally fast.

Acceptance criteria

  • Search matches filename, title, metadata, paths, and URLs
  • Results are ordered by a defined and documented precedence between those five — a filename match should not rank equally with a metadata match
  • The matched field is visible in the result row, so a path or metadata hit doesn't read as noise
  • Partial and prefix filename matching works, including underscores and extensions
  • A known filename is findable by typing a leading fragment of it
  • Every result matches the entered term in a field search is documented to cover — no unexplainable results
  • Search and pagination meet an agreed response-time target at millions-of-assets scale
  • Search behaves correctly when combined with the existing filter chips
  • Behaviour is verified at that scale, and protected against regression

Out of scope

  • The filter chip UX — owned by [EPIC] Content Drive: Search #35430 (Content Drive: Search). Same surface, so the two need coordinating.
  • New search capabilities — semantic or vector search, natural-language queries, AI-assisted search. This is about making literal search work; anything smarter builds on it.
  • New metadata or DAM features — auto-tagging, custom metadata schemas, where-used tracking.
  • Upload and workflow-action performance — unless they turn out to share a cause with this.

Notes

The seven-minute figure is a report, not a measurement. Worth confirming early, because it's also what sizes this work — at the moment we can't estimate it.

Whether the two problems share a root cause is unknown. If one thing is causing both the slowness and the bad relevance, this is much smaller than if they're independent. That answer changes the shape of the work, so it's worth knowing before committing to a plan.

Widening search to five surfaces makes the relevance bar harder, not easier. More legitimate matches means more results a user can't immediately explain, even when every one is technically correct. This is the part most likely to pass its tests and still feel wrong.

Tightening relevance will look like a regression to someone. Results people currently see will disappear. That's intended, but it needs saying out loud when it ships.

Open questions

  • What response-time target should we hold? Search-as-you-type and page-to-page navigation may warrant different numbers. Happy to set this once there's a measurement to set it against.
  • What precedence order across the five surfaces? A match in each is valid but they shouldn't rank equally. Product decision — flag it when you get there and we'll settle it.

References

Sub-issues

Sub-issues

11 of 11 Issues completed
Loading 11 sub-issues

Activity

  1. moved this from New to Next Sprint in dotCMS - Product Planningon Jul 31, 2026
  2. moved this from Next Sprint to Current Sprint Backlog in dotCMS - Product Planningon Aug 21, 2026
  3. added theissue type on Aug 26, 2026
  4. changed the title [-]Content Drive: Search & Performance at Scale[/-] [+][EPIC] Content Drive: Search & Performance at Scale[/+] on Oct 7, 2026
  5. moved this from Current Sprint Backlog to Done in dotCMS - Product Planningon Oct 9, 2026
  6. github-actions commented on Nov 23, 2026

    @github-actions
    Contributor

    Documentation Assessment: Content Drive — Search & Performance at Scale (#36814)

    action: update
    urlTitle: caffeine-cache-provider

    Determination

    This Epic is almost entirely backend performance and correctness work on Content Drive's folder-listing and search machinery: a SQL query rewrite (materialized CTE for folder-scoped candidate lookups), adaptive chunk sizing for permission-filtered listings, a single-pass resolution path for index-routed field filters, and several defect fixes (duplicate pagination pages, a global-search/content-type-filter composition bug, double-click pagination requests, and silent partial results on a failed search sub-query, which now surfaces a visible error instead).

    None of that is itself documentable: it changes internal query shape, chunking strategy, and error propagation without changing any user-facing surface, workflow, or REST contract in a way the public docs describe at that level of detail. The one exception is a shipped default-value change that a public docs page already states explicitly and now states incorrectly.

    What changed and is user-facing enough to matter

    Sub-issue #37186 (and its implementing PR, #37394) raised the default value of the cache.userdotcmscache.size configuration property from the previous effective default of 1000 to 4000, to stop the user cache from thrashing on instances with a large active-user base and causing repeated per-row user lookups during folder listings. This is a genuine shipped behavior change (confirmed in the current dotmarketing-config.properties, not just planning language), and it is exactly the kind of fact this property's own reference page states as a bare number.

    Current documentation coverage

    A search of the documentation turned up the Caffeine Cache Provider page, which lists cache.userdotcmscache.size=1000 under "Cache Region Sizes" as one of the properties' default values. That line is now stale — the shipped default is 4000. Everything else on that page (the Caffeine overview, the default-region-size mechanism, the cache-chain properties) is unaffected and accurate.

    No other public page needed a check against this Epic's other deliverables:

    • The Content Drive page's description of search ("Title" vs. "All Fields") and filter-chip behavior already describes the correct behavior these fixes restore (filters narrow results; they don't add or drop matches) — the bugs fixed here were implementation defects against already-correctly-stated behavior, not gaps in what the docs promise.
    • Moving to Content Drive and the Caffeine Cache Provider/Cache Configuration pages don't describe folder-listing query internals, chunk sizing, or ES sub-query error handling — none of that is documented today, and none of it should be, since it's implementation detail rather than something a dotCMS administrator or content author configures or observes directly.
    • The Epic's own acceptance criteria (search across all five surfaces with a defined, documented precedence and a visible "which field matched" indicator in the UI) describe a larger scope than what the closed sub-issues and merged PRs actually delivered. None of the sub-issues implement new search-surface coverage, a precedence order, or a matched-field UI indicator — the delivered work is scoped to performance and defect fixes within the existing search surface. There is nothing to document for capability that wasn't actually shipped.

    Recommended change

    Update the single stale value in the Caffeine Cache Provider page's default-size list. No other wording on that page needs to change — the property's purpose and mechanism are unaffected by the new default.

    Documentation Draft

    Caffeine Cache Provider

    urlTitle: caffeine-cache-provider
    modified: 2025-03-07 15:20:18.055

    The Caffeine cache provider is a dotCMS implementation of the Caffeine cache by Ben Manes. Caffeine is a local, memory-only cache. For more information on cache providers in dotCMS, please see the Cache Properties documentation.

    What is Caffeine? {#Caffeine}

    Caffeine is a local, high-performance, memory-only cache library, with features including but not limited to:

    • Automatic loading of entries into the cache, optionally asynchronously.
    • Size-based eviction when a maximum is exceeded based on frequency and recency.
    • Time-based expiration of entries, measured since last access or last write.
    • Asynchronous refresh when the first stale request for an entry occurs.
    • Writes propagated to an external resource

    For more information about Caffeine, please see the Caffeine page on Github or the Caffeine user's guide.

    Caffeine in dotCMS {#CaffeineIndotCMS}

    A Caffeine cache provider is included with dotCMS, and is enabled by default for all cache regions in both Community and Enterprise editions. All customers may change the cache Configuration Properties (see below), and customers with an Enterprise license may change how the Caffeine cache provider is used in each cache region.

    Configuration Properties {#ConfigurationProperties}

    The following parameters in the configuration properties control the bahavior of the Caffeine cache. Please note that Caffeine does not use a segmented cache, so while some of these properties may be familiar in the context of other cache providers, there is no cache.concurrencylevel property.

    Default Cache Region Size {#DefaultProperties}

    The following parameter configures the default cache size (number of entries) of the Caffeine cache:

    cache.default.size=1000

    This parameter specifies the default cache size (number of entries), which will be used for any cache region which does not have a cache size set explicitly (see below).

    Cache Region Sizes {#CacheRegionSize}

    In addition to the default cache settings, you can also specify the size (number of entries) of each cache region, giving you the flexibility to tune the cache for the specific design of your site. The following settings are the defaults, but may be modified by editing these properties:

    cache.adminconfigpool.size=100
    cache.blockdirectivecache.size=1000
    cache.categorybykeycache.size=1000
    cache.categorycache.size=1000
    cache.categorychildrencache.size=1000
    cache.categoryparentscache.size=1000
    cache.companypool.size=10
    cache.contentletcache.size=5000
    cache.fileassetmetadatacache.size=200
    cache.dotcmslayoutcache.size=1000
    cache.dotcmsrolecache.size=1000
    cache.dotcmsrolekeycache.size=1000
    cache.dotcmsuserrolecache.size=1000
    cache.fieldscache.size=1000
    cache.filecache.size=1000
    cache.foldercache.size=1000
    cache.hostaliascache.size=1000
    cache.hostcache.size=1000
    cache.hostvariablescache.size=1000
    cache.htmlpagecache.size=1000
    cache.identifiercache.size=50000
    cache.languagecacheimpl.size=1000
    cache.navcache.size=1000
    cache.parentpermissionablecache.size=10000
    cache.permissioncache.size=50000
    cache.plugincache.size=1000
    cache.portletpool.size=100
    cache.structurecache.size=500
    cache.templatecache.size=500
    cache.userdotcmscache.size=4000
    cache.useremaildotcmscache.size=1000
    cache.userproxycache.size=1000
    cache.velocitycache.size=1000
    cache.velocitymenucache.size=1000
    cache.velocitymisscache.size=1000
    cache.versioncache.size=50000
    cache.versioninfocache.size=50000
    cache.virtuallinkscache.size=1000
    cache.workflowcache.size=1000
    cache.workflowstepcache.size=1000
    cache.workflowtaskcache.size=10000
    cache.indiciescache.size=8
    cache.publishingendpointcache.size=100
    cache.workflowactioncache.size=10000
    cache.logmappercache.size=10
    cache.translatedquerycache.size=5000
    cache.csscache.size=2500
    cache.dotcmsrootrolescache.size=1000
    cache.identifier404cache.size=1000
    cache.fieldsvarcache.size=1000
    cache.relationshipcachebyname.size=1000
    cache.relationshipcachebyinode.size=1000
    cache.propertycache.size=1000
    cache.containercache.size=1000
    cache.newnotificationcache.size=1000
    cache.containerstructurecache.size=1000
    cache.blockdirectivehtmlpagecache=1000
    cache.pushedassetscache=5000
    cache.ratingcache=1000
    cache.velocityuservtlcache=500

    Cache Chain Properties {#CacheChainProperties}

    The default cache chain includes the Caffeine cache provider by default:

    cache.default.chain=com.dotmarketing.business.cache.provider.caffeine.CaffeineCache

    Therefore you only need to add the Caffeine cache provider to the cache chain for any new cache chain properties you create for specific cache regions. To add the Caffeine cache provider to the cache chain property for a region, you must add com.dotmarketing.business.cache.provider.caffeine.CaffeineCache to the cache chain properties for the cache regions where you wish to use it. For example, the following property specifies a cache chain for the adminconfigpool cache region that uses only the Caffeine Cache:

    cache.adminconfigpool.chain=com.dotmarketing.business.cache.provider.caffeine.CaffeineCache

    For more information on how to configure cache regions to use the Caffeine Cache provider, please see the Cache Chaining documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions