Solr plugin setup and usage

This project uses Solr for powering the on-site search. This is available via Pantheon through a site setting "add-on" and a drop-in WordPress plugin.

No special configuration is needed for WordPress itself -- all default search behavior is automatically powered by Solr with the plugin and addon both active.

To enable Solr inside the Pantheon Dashboard (e.g. https://dashboard.pantheon.io/sites/c19844b2-4d92-46bc-9939-f7fd84fb17e4#dev/code): 1. Click on the Settings item in the menu 1. Click on Add Ons menu item 1. Cilck "Add" to add the Solr integration

The Pantheon Solr plugin is already included as a project dependency in composer.json.

How to reindex content

There are two easy ways to manually rebuild the Solr index if required (by default, new and updated contenta is automatically indexed on post save).

Inside WP Admin

  • Click on the Solr Power admin menu item
  • Click on the Actions tab
  • Click the "Start Index" button to reindex searable post types

If you want to reconfigure the indexing settings, you can click on the Indexing Options tab in the SOlr Power settings.

Via Command Line

Run the following Terminus command to trigger a reindex: bash terminus wp <site>.<env> -- solr index

You can read an learn more via Pantheon Docs