Blog Sections Open

Speeding Up Search on Large Evolution CMS Sites

AjaxSearch can become painfully slow on large sites if it searches all TV data by default. A narrower search scope is often enough to make it usable again.

AjaxSearch may feel acceptable on a small site, but on a project with thousands of resources it can quickly become unusable. The legacy case here involved a site with more than 5,000 resources where search requests took so long they often ended in a 404 or timeout.

The Expensive Default

The problem turned out to be the default search configuration:

$dcfg['whereSearch'] = 'content|tv';

That instructs AjaxSearch to search broadly, including TV data. On a larger site, that can become far too expensive.

The Working Fix

The successful adjustment was to narrow the searchable fields and list the required TVs explicitly:

$dcfg['whereSearch'] = 'content:pagetitle,content';
$dcfg['withTvs'] = 'sku';

Why This Helps

  • whereSearch stops scanning every TV field
  • the main content search stays focused on useful text fields
  • only the truly needed TVs are joined through withTvs

Practical Takeaway

If search performance collapses on a large Evolution site, start by auditing whereSearch. Broad TV scanning is convenient when prototyping, but it is rarely the right production setting for a large catalog or content archive.

Newer post

Caching Pages Selectively When GET Parameters Are Present

A practical rule for GET-aware caching: search pages and other high-cardinality query pages should usually stay uncached or use a strict allowlist.

Older post

Why Pages Return 404 on the First Request and 200 on the Second

A troubleshooting checklist for the strange case where a page returns 404 on the first hit but loads normally on the second request.