Skip to content

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 24 Apr 17:11

Scolta WordPress 0.3.2

Coordinated release across scolta-core, scolta-php, scolta-wp, scolta-drupal, scolta-laravel.

Coordinated release. Fixes memory and CLI visibility regressions surfaced by a 44,107-page real-world WordPress deployment.

Fixed

  • Silent CLI during 52-minute build: do_build_php() was passing neither a LoggerInterface nor a ProgressReporterInterface to IndexBuildOrchestrator::build(), so all progress output went to NullLogger/NullProgressReporter. Added Scolta_WP_CLI_Logger (PSR-3 bridge to WP_CLI::log/::warning/::debug) and Scolta_WP_CLI_Progress_Reporter (wraps WP_CLI\Utils\make_progress_bar); both are now passed to build(). (#6)
  • Peak RAM on large corpora (observed 2,870 MB on 44k-page site): Scolta_Content_Gatherer::gather() used WP_Query( 'posts_per_page' => -1 ) and returned a materialized ContentItem[] array, pre-loading every post into memory before the streaming indexer ran. Now returns a \Generator that paginates WP_Query in batches of 100 and calls wp_cache_flush_group('posts') between batches. Posts now flow through the pipeline one batch at a time. The gather-upstream eager-load was always present; 0.3.1 appeared to fix OOM because the streaming finalize removed the finalize-time doubling, but gather-side was unfixed until now. (#6)

Added

  • Flexible memory budget and chunk size: The Memory Budget admin field now accepts profile names (conservative, balanced, aggressive) or a raw byte value (256M, 1G) in addition to the three preset profiles. A new Chunk Size admin field lets you set pages-per-chunk independently of the memory budget — leave it blank to use the profile default (50/200/500). Both values can also be overridden per-run via --memory-budget=<budget> and --chunk-size=<n> on wp scolta build and wp scolta diagnose. (#8)
  • wp scolta diagnose: New WP-CLI command that profiles the PHP indexer pipeline in three isolated phases — gather (WP_Query + apply_filters('the_content') + get_permalink), HtmlCleaner, and indexer — on a configurable post sample (default 500). Prints per-phase ms/post, projects the full-corpus duration, and emits a recommendation identifying the dominant bottleneck. Use this to determine whether a slow build is caused by WordPress content filters, HTML cleaning, or the indexer itself. (#8)
  • Scolta_Content_Gatherer::gatherCount(): int: COUNT-only query using WP_Query with fields='ids', returning just the integer count. Used by do_build_php() for the early-exit check and to pre-size BuildIntent without loading post content. (#6)

Installation

Download scolta-wp-0.3.2.zip below. In WP-Admin → Plugins → Add New → Upload Plugin → select the zip → Install → Activate. The zip contains a scolta-wp/ directory with vendor/autoload.php and scolta.php.

Verification

After installing, confirm:

  • Search result titles link to real URLs, not #
  • wp scolta build prints chunk-cadence progress throughout the run (no more silent builds)
  • Peak RAM on large corpora is substantially reduced vs 0.3.1

Feedback

Issues: https://github.com/tag1consulting/scolta-wp/issues

Acknowledgements

Thanks to Hank VanZile for surfacing the 0.3.1 regressions via real-world 44k-page testing.

Full changelog

See CHANGELOG.md at tag v0.3.2.