Features

Multi-search: Prioritise Recent Content for Faster Searches

Published · Last updated

The Multi-search tab configures a two-phase search strategy that restricts Phase 1 to recent content only, falling back to an unrestricted search if not enough results are found. This is a big win on sites with large archives (news, blogs, forums) where most users searching for a term are after recent coverage – serving Phase 1 results is significantly faster than scanning years of old posts.

Best for
  • Large archives (tens of thousands of posts or more) where old content dominates the table
  • News, blog and forum sites where most searches are for current topics
  • Sites where popular-term search feels slower than you would like

How it works

With multi-phase search enabled, every search runs in up to two phases:

  1. Phase 1 (recent only): Super Speedy Search restricts the query to content published within the configured recent period (e.g. last 30 days). If a full page of results is found, those are returned and a “Search older items” button replaces the normal pagination.
  1. Phase 2 (fallback): If Phase 1 returns fewer than a full page of results, the query is re-run without the date restriction and Phase 2 results are returned instead. The user never sees that two queries ran.

The AJAX dropdown search uses the same two-phase logic, so the instant-results panel also benefits.

Settings

Enable multi-phase search

The master toggle. When off, all searches behave normally (no date restriction, standard pagination).

Recent period

How far back Phase 1 looks. Defaults to 30 days. Available units:

  • days
  • weeks
  • months

Choose a period that matches your typical content freshness. For a daily news site, 7 – 30 days is usually right. For a blog that publishes weekly, 3 – 6 months is more appropriate.

Button text

The label on the button that replaces pagination when Phase 1 returned a full page of results. Defaults to “Search older items”. This text is translatable – edit it here if you want to match your site’s tone (e.g. “See older articles”, “Show archive results”).

When to enable multi-phase search

Enable it if any of the following are true:

  • You have a large wp_posts table (tens of thousands of posts or more).
  • Most users search for current topics and rarely need archive results.
  • Your search performance on popular terms is slower than you’d like.

Skip it if:

  • Your archive is small – the overhead of running two queries on misses outweighs any Phase 1 win.
  • Users typically search for historical content (e.g. a research archive where old posts are equally relevant).
Don’t use this if
  • On small sites, where the second query on every miss costs more than the recent-only Phase 1 ever saves
  • On research or reference archives, where an old post is just as relevant as a new one and pushing recent content first would hurt results

Interaction with caching

Multi-phase search works with the Analytics & Caching tab’s caching rules. When a cached result exists for a given term, it is returned immediately – Phase 1 / Phase 2 logic only applies to cache misses. This means once a popular recent-only term is cached, it stays fast regardless of which phase originally produced it.

The “Search older items” button

When Phase 1 returns a full page of recent results, the normal pagination is replaced with a single button. Clicking it appends ?sss_show_older=1 to the URL, which tells Super Speedy Search to skip the date restriction and show the full unrestricted result set (excluding the items already shown in Phase 1).

This is handled via a small script injected into wp_footer, so it works across all themes without requiring template changes. If your theme doesn’t expose a standard .pagination / .nav-links / nav.navigation / .woocommerce-pagination element, the button is appended inside the main content area (main, .site-main, .content-area, etc.) as a fallback.

Tips

  • Start with the default 30 days. If you see too many “Search older items” clicks in the Analytics & Caching tab, widen the period. If you rarely see the button appear, narrow it.
  • Combine with slow-search auto-cache. Terms that still take a while even in Phase 1 will be auto-cached on their second hit if you enable slow-search caching on the Analytics & Caching tab.
  • Cache is per-phase transparent. The cache key includes the search term, post type, page number and language – not the phase – so cached results survive a toggle of this setting.

Large Catalogues and Archives

Below the multi-phase settings, the Multi-search tab holds a separate Large Catalogues and Archives section. Its settings work independently of multi-phase search and need no rebuild:

  • Limit weighted relevance ranking to an initial full-text candidate set caps how many raw matches are fully scored and ordered.
  • Score each weighted field with one full-text match instead of two makes scoring cheaper. See Boolean-only relevance scoring.
  • Skip searches made only of words shorter than 3 characters stops 1 and 2 character searches reading the whole index. See Skipping searches made only of short words.

Further reading

the caching rules that keep Phase 1 and Phase 2 results fast on repeat searches
where multi-phase search sits in the wider performance picture
a hard date cut-off, for when you never want old content in results at all

Comments

▲
▼
1/1