{"id":40252,"date":"2015-11-20T23:52:47","date_gmt":"2015-11-20T23:52:47","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/solr-power\/"},"modified":"2024-12-09T18:05:01","modified_gmt":"2024-12-09T18:05:01","slug":"solr-power","status":"publish","type":"plugin","link":"https:\/\/bn.wordpress.org\/plugins\/solr-power\/","author":14052970,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.6.0","stable_tag":"2.6.0","tested":"6.7.5","requires":"4.6","requires_php":"7.1","requires_plugins":null,"header_name":"Solr Power","header_author":"Pantheon","header_description":"","assets_banners_color":"4a1b12","last_updated":"2024-12-09 18:05:01","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"http:\/\/pantheon.io","rating":4,"author_block_rating":0,"active_installs":100,"downloads":93555,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.3":{"tag":"0.3","author":"andrew.taylor","date":"2016-05-04 13:40:01"},"0.4":{"tag":"0.4","author":"andrew.taylor","date":"2016-07-05 19:06:16"},"0.4.1":{"tag":"0.4.1","author":"andrew.taylor","date":"2016-07-13 20:26:27"},"0.5.0":{"tag":"0.5.0","author":"andrew.taylor","date":"2016-09-12 13:02:18"},"0.6.0":{"tag":"0.6.0","author":"andrew.taylor","date":"2016-10-19 22:27:26"},"1.0.0":{"tag":"1.0.0","author":"andrew.taylor","date":"2016-12-20 22:34:36"},"1.1.0":{"tag":"1.1.0","author":"andrew.taylor","date":"2017-04-10 20:31:23"},"1.2.0":{"tag":"1.2.0","author":"andrew.taylor","date":"2017-04-18 17:28:50"},"1.3.0":{"tag":"1.3.0","author":"andrew.taylor","date":"2017-06-29 16:44:18"},"1.4.0":{"tag":"1.4.0","author":"andrew.taylor","date":"2017-08-16 20:16:43"},"1.4.1":{"tag":"1.4.1","author":"andrew.taylor","date":"2017-10-19 21:54:08"},"1.5.0":{"tag":"1.5.0","author":"andrew.taylor","date":"2018-06-26 23:37:53"},"2.0.0":{"tag":"2.0.0","author":"andrew.taylor","date":"2018-09-10 20:30:52"},"2.1.1":{"tag":"2.1.1","author":"danielbachhuber","date":"2019-08-14 19:42:15"},"2.1.2":{"tag":"2.1.2","author":"danielbachhuber","date":"2019-10-27 13:16:42"},"2.1.3":{"tag":"2.1.3","author":"danielbachhuber","date":"2020-03-27 19:22:10"},"2.1.4":{"tag":"2.1.4","author":"danielbachhuber","date":"2020-04-24 12:08:04"},"2.2.0":{"tag":"2.2.0","author":"danielbachhuber","date":"2020-05-05 14:55:38"},"2.2.1":{"tag":"2.2.1","author":"danielbachhuber","date":"2020-11-25 18:47:45"},"2.2.2":{"tag":"2.2.2","author":"danielbachhuber","date":"2020-12-03 23:57:23"},"2.2.3":{"tag":"2.2.3","author":"danielbachhuber","date":"2021-03-08 17:14:31"},"2.2.4":{"tag":"2.2.4","author":"danielbachhuber","date":"2021-07-12 12:59:50"},"2.2.5":{"tag":"2.2.5","author":"danielbachhuber","date":"2022-01-24 13:09:32"},"2.2.6":{"tag":"2.2.6","author":"danielbachhuber","date":"2022-02-22 11:08:35"},"2.3.0":{"tag":"2.3.0","author":"danielbachhuber","date":"2022-03-29 20:55:38"},"2.3.1":{"tag":"2.3.1","author":"danielbachhuber","date":"2022-03-29 21:15:46"},"2.3.2":{"tag":"2.3.2","author":"danielbachhuber","date":"2022-04-01 11:17:43"},"2.3.3":{"tag":"2.3.3","author":"getpantheon","date":"2022-10-03 20:07:25"},"2.4.0":{"tag":"2.4.0","author":"getpantheon","date":"2022-11-30 15:59:44"},"2.4.1":{"tag":"2.4.1","author":"getpantheon","date":"2022-12-01 21:28:46"},"2.4.2":{"tag":"2.4.2","author":"getpantheon","date":"2022-12-02 18:02:00"},"2.4.3":{"tag":"2.4.3","author":"getpantheon","date":"2023-01-19 16:09:02"},"2.4.4":{"tag":"2.4.4","author":"getpantheon","date":"2023-04-07 20:06:46"},"2.4.5":{"tag":"2.4.5","author":"getpantheon","date":"2023-04-10 05:46:28"},"2.5.0":{"tag":"2.5.0","author":"getpantheon","date":"2023-07-12 21:43:40"},"2.5.1":{"tag":"2.5.1","author":"getpantheon","date":"2023-07-26 20:42:06"},"2.5.2":{"tag":"2.5.2","author":"getpantheon","date":"2023-09-12 22:15:43"},"2.5.3":{"tag":"2.5.3","author":"getpantheon","date":"2024-04-25 00:01:42"},"2.6.0":{"tag":"2.6.0","author":"getpantheon","date":"2024-12-09 18:05:01"}},"upgrade_notice":{"2.5.0":"<p>Changes the default auto-commit behavior to disabled. See <a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/#explicit-commit-vs-autocommit\">the README<\/a> for instructions for keeping enabled.<\/p>"},"ratings":{"1":0,"2":0,"3":1,"4":0,"5":1},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2826602,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2826602,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":2826602,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.3","0.4","0.4.1","0.5.0","0.6.0","1.0.0","1.1.0","1.2.0","1.3.0","1.4.0","1.4.1","1.5.0","2.0.0","2.1.1","2.1.2","2.1.3","2.1.4","2.2.0","2.2.1","2.2.2","2.2.3","2.2.4","2.2.5","2.2.6","2.3.0","2.3.1","2.3.2","2.3.3","2.4.0","2.4.1","2.4.2","2.4.3","2.4.4","2.4.5","2.5.0","2.5.1","2.5.2","2.5.3","2.6.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[944],"plugin_category":[],"plugin_contributors":[77761,81130,82469,77514,79920,80736,148561,188281,86320,79921,84151],"plugin_business_model":[],"class_list":["post-40252","plugin","type-plugin","status-publish","hentry","plugin_tags-search","plugin_contributors-10up","plugin_contributors-andrewtaylor-1","plugin_contributors-collinsinternet","plugin_contributors-danielbachhuber","plugin_contributors-getpantheon","plugin_contributors-jazzs3quence","plugin_contributors-jspellman","plugin_contributors-mattleff","plugin_contributors-mikengarrett","plugin_contributors-outlandish-josh","plugin_contributors-pwtyler","plugin_committers-getpantheon","plugin_support_reps-anaispantheor","plugin_support_reps-greg1anderson-1","plugin_support_reps-jazzsequence","plugin_support_reps-pwtyler","plugin_support_reps-roshnykunjappan","plugin_support_reps-swb1192"],"banners":{"banner":"https:\/\/ps.w.org\/solr-power\/assets\/banner-772x250.png?rev=2826602","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/solr-power\/assets\/icon-128x128.png?rev=2826602","icon_2x":"https:\/\/ps.w.org\/solr-power\/assets\/icon-256x256.png?rev=2826602","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p><a href=\"https:\/\/circleci.com\/gh\/pantheon-systems\/solr-power\"><\/a><\/p>\n\n<p>Search is critical for your site, but the default search for WordPress leaves a lot to be desired. Improve your user experience with the Apache Solr search engine for your WordPress website.<\/p>\n\n<ul>\n<li>Fast results, with better accuracy.<\/li>\n<li>Enables faceting on fields such as tags, categories, author, and page type.<\/li>\n<li>Indexing and faceting on custom fields.<\/li>\n<li>Drop-in support for <a href=\"https:\/\/codex.wordpress.org\/Class_Reference\/WP_Query\">WP_Query<\/a> with the <code>solr_integrate<\/code> parameter set to true.<\/li>\n<li>Completely replaces default WordPress search, just install and configure.<\/li>\n<li>Completely integrated into default WordPress theme and search widget.<\/li>\n<li>Very developer-friendly: uses the modern <a href=\"http:\/\/www.solarium-project.org\/\">Solarium<\/a> library<\/li>\n<\/ul>\n\n<h3>Development<\/h3>\n\n<p>This plugin is under active development on GitHub:<\/p>\n\n<p><a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\">https:\/\/github.com\/pantheon-systems\/solr-power<\/a><\/p>\n\n<p>Please feel free to file issues there. Pull requests are also welcome! See <a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/blob\/main\/CONTRIBUTING.md\">CONTRIBUTING.md<\/a> for information on contributing.<\/p>\n\n<p>For further documentation, such as available filters and working with the <code>SolrPower_Api<\/code> class directly, please see the project wiki:<\/p>\n\n<p><a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/wiki\">https:\/\/github.com\/pantheon-systems\/solr-power\/wiki<\/a><\/p>\n\n<p>You may notice there are two sets of tests running, on two different services:<\/p>\n\n<ul>\n<li><a href=\"https:\/\/phpunit.de\/\">PHPUnit<\/a> test suite against a Solr instance.<\/li>\n<li>The <a href=\"http:\/\/behat.org\/\">Behat<\/a> test suite against a Pantheon site, to ensure the plugin's compatibility with the Pantheon platform.<\/li>\n<\/ul>\n\n<p>Both of these test suites can be run locally, with a varying amount of setup.<\/p>\n\n<p>PHPUnit requires the <a href=\"https:\/\/make.wordpress.org\/core\/handbook\/testing\/automated-testing\/phpunit\/\">WordPress PHPUnit test suite<\/a>, and access to a database with name <code>wordpress_test<\/code>. If you haven't already configured the test suite locally, you can run <code>bash bin\/install-wp-tests.sh wordpress_test root '' localhost<\/code>. You'll also need access to a running Solr instance, in order to run the unit tests against Solr.<\/p>\n\n<p>Behat requires a Pantheon site with Solr enabled. Once you've created the site, you'll need <a href=\"https:\/\/github.com\/pantheon-systems\/terminus#installation\">install Terminus<\/a>, and set the <code>TERMINUS_TOKEN<\/code>, <code>TERMINUS_SITE<\/code>, and <code>TERMINUS_ENV<\/code> environment variables. Then, you can run <code>.\/bin\/behat-prepare.sh<\/code> to prepare the site for the test suite.<\/p>\n\n<p>Note that dependencies are installed via Composer and the <code>vendor<\/code> directory is not committed to the repository. You will need to run <code>composer install<\/code> locally for the plugin to function. You can read more about Composer <a href=\"https:\/\/getcomposer.org\">here<\/a><\/p>\n\n<h3>WP-CLI Support<\/h3>\n\n<p>This plugin has <a href=\"http:\/\/wp-cli.org\/\">WP-CLI<\/a> support.<\/p>\n\n<p>All Solr Power related commands are grouped into the <code>wp solr<\/code> command, see an example:<\/p>\n\n<pre><code>$ wp solr\nusage: wp solr check-server-settings\n   or: wp solr delete [&lt;id&gt;...] [--all]\n   or: wp solr index [--batch=&lt;batch&gt;] [--batch_size=&lt;size&gt;] [--post_type=&lt;post-type&gt;]\n   or: wp solr info [--field=&lt;field&gt;] [--format=&lt;format&gt;]\n   or: wp solr optimize-index\n   or: wp solr repost-schema\n   or: wp solr stats [--field=&lt;field&gt;] [--format=&lt;format&gt;]\n\nSee 'wp help solr &lt;command&gt;' for more information on a specific command.\n<\/code><\/pre>\n\n<p>You can see more details about the commands using <code>wp help solr<\/code>:<\/p>\n\n<pre><code>**NAME**\n\n  wp solr\n\n**DESCRIPTION**\n\n  Perform a variety of actions against your Solr instance.\n\n**SYNOPSIS**\n\n  wp solr &lt;command&gt;\n\n**SUBCOMMANDS**\n\n  check-server-settings      Check server settings.\n  delete                     Remove one or more posts from the index.\n  index                      Index all posts for a site.\n  info                       Report information about Solr Power configuration.\n  optimize-index             Optimize the Solr index.\n  repost-schema              Repost schema.xml to Solr.\n  stats                      Report stats about indexed content.&lt;h3&gt;WP_Query Integration&lt;\/h3&gt;\n<\/code><\/pre>\n\n<p>Use Solr in a custom WP_Query instead of querying a database. Add <code>'solr_integrate' =&gt; true<\/code> to the query arguments.<\/p>\n\n<p><strong>NOTE:<\/strong> Currently, only basic queries, tax_query, meta_query and date_query are supported. See <code>examples\/example.custom_WP_Query.php<\/code> for an example.<\/p>\n\n<p>A meta_query can use the following compare operators:<\/p>\n\n<ul>\n<li><code>'='<\/code><\/li>\n<li><code>'!='<\/code><\/li>\n<li><code>'&gt;'<\/code><\/li>\n<li><code>'&gt;='<\/code><\/li>\n<li><code>'&lt;'<\/code><\/li>\n<li><code>'&lt;='<\/code><\/li>\n<li><code>'LIKE'<\/code><\/li>\n<li><code>'NOT LIKE'<\/code><\/li>\n<li><code>'IN'<\/code><\/li>\n<li><code>'NOT IN'<\/code><\/li>\n<li><code>'BETWEEN'<\/code><\/li>\n<li><code>'NOT BETWEEN'<\/code><\/li>\n<li><code>'EXISTS'<\/code><\/li>\n<li><code>'NOT EXISTS'<\/code><\/li>\n<\/ul>\n\n<p>(<code>'REGEXP'<\/code>, <code>'NOT REGEXP'<\/code>, and <code>'RLIKE'<\/code> are not supported.)<h3>Configuration Tips<\/h3><\/p>\n\n<p><h4>Searching by author name<\/h4><\/p>\n\n<p>To support searching by author name (e.g. where \"Pantheon\" would return posts authored by the \"Pantheon\" user), add the following to your custom <code>schema.xml<\/code>:<\/p>\n\n<pre><code>  &lt;copyField source=\"post_author\" dest=\"text\"\/&gt;\n<\/code><\/pre>\n\n<p><h4>Boosting relevancy score by publish date<\/h4><\/p>\n\n<p>The following guidance can be used to extend the Solr index and modify boosts beyond just this example.<\/p>\n\n<p>To support math functions on dates, you must add a custom <code>schema.xml<\/code> to Solr and <strong>reindex with the new schema<\/strong>.<\/p>\n\n<p>Add the following to <code>schema.xml<\/code>:<\/p>\n\n<pre><code>  &lt;!-- Add to &lt;types&gt; --&gt;\n  &lt;!-- See: https:\/\/lucene.apache.org\/solr\/6_2_0\/solr-core\/org\/apache\/solr\/schema\/TrieDateField.html --&gt;\n  &lt;fieldType name=\"tdate\" class=\"solr.TrieDateField\" omitNorms=\"true\" precisionStep=\"6\" positionIncrementGap=\"0\"\/&gt;\n\n  &lt;!-- Add to &lt;fields&gt; --&gt;\n  &lt;field name=\"post_date_iso\" type=\"tdate\" indexed=\"true\" stored=\"true\" required=\"true\" \/&gt;\n<\/code><\/pre>\n\n<p>Add the following to your <code>functions.php<\/code> file.<\/p>\n\n<pre><code>  &lt;?php\n  \/**\n   * Hooks into the document build process to add post date field in proper format.\n   *\/\n  function my_solr_build_document( $doc, $post_info ) {\n        $post_time = strtotime( $post_info-&gt;post_date );\n        \/\/ Matches format required for TrieDateField\n        $doc-&gt;setField( 'post_date_iso', gmdate( 'c\\Z', $post_time ) );\n        return $doc;\n  }\n  add_filter( 'solr_build_document', 'my_solr_build_document', 10, 2 );\n\n  \/**\n   * Hooks into query processor, Dismax, to add publish date boost.\n   * See: https:\/\/www.metaltoad.com\/blog\/date-boosting-solr-drupal-search-results\n   *\/\n  function my_solr_dismax_query( $dismax ) {\n        $dismax-&gt;setQueryParser( 'edismax' );\n        $dismax-&gt;setBoostQuery( 'recip(abs(ms(NOW\/HOUR,post_date_iso),3.16e-11,1,1))' );\n        return $dismax;\n  }\n  add_filter( 'solr_dismax_query', 'my_solr_dismax_query' );\n<\/code><\/pre>\n\n<p><h4><code>is_solr_query<\/code> Filter<\/h4><\/p>\n\n<p>The <code>is_solr_query<\/code> filter controls whether Solr should be used for a specific query.<\/p>\n\n<p>Parameters:<\/p>\n\n<ul>\n<li>$enabled (bool): Indicates whether Solr should be used for the query. Defaults to true if the query is a search or if solr_integrate is set in the query.<\/li>\n<li>$query (WP_Query): The current WordPress query object.<\/li>\n<\/ul>\n\n<p>Return:<\/p>\n\n<ul>\n<li><p>bool: true to enable Solr for the query, false to disable it.<\/p>\n\n<p>add_filter( 'is_solr_query', function( $enabled, $query ) {\n    if ( $query-&gt;is_category( 'news' ) ) {\n        return false;\n    }\n    return $enabled;\n}, 10, 2 );<\/p><\/li>\n<\/ul>\n\n<p><h4>Custom schema file path<\/h4><\/p>\n\n<p>By default, custom schema is sourced from <code>wp-content\/uploads\/solr-for-wordpress-on-pantheon\/schema.xml<\/code>. This can be overridden with an absolute path using the the <code>solr_power_customer_schema_file_path<\/code> filter.<\/p>\n\n<p>Parameters:\n* $custom_schema_file_path (string): Default path to a custom schema file<\/p>\n\n<p>Return:\n* string: Absolute path to a custom schema.xml file.<\/p>\n\n<pre><code>add_filter('solr_power_customer_schema_file_path', function($custom_schema_file_path) {\n    return '\/absolute\/path\/to\/schema.xml';\n});\n<\/code><\/pre>\n\n<p><h4>Common issues<\/h4><\/p>\n\n<ul>\n<li>Failing to post the schema.xml will result in an error during indexing, \"Missing <code>post_date_iso<\/code> field.\"<\/li>\n<li>If you have the field and type in the schema, but don't add the <code>solr_build_document<\/code> filter, you will get a similar error.<\/li>\n<li>If the <code>post_date_iso<\/code> field is missing from the index, Solr will ignore this boost and return regular results.<\/li>\n<li>Trying to use a regular date field for the boost query will result in an error in the request instead of results.<\/li>\n<\/ul>\n\n<p><h4>Explicit Commit vs Autocommit<\/h4><\/p>\n\n<p>Once solr has sent the data to the solr server, solr must COMMIT the data to the index and adjust the index and relevancy ratings accordingly before that data can appear in search results.<\/p>\n\n<p>By default, Solr Search for WordPress has auto-commit disabled. The index is committed when the uncommitted item is two minutes old, or the cron runs. By default, the cron runs on the Pantheon platform every hour.<\/p>\n\n<p>When autocommit is enabled, Solr Search for WordPress commits data when it sends every post. When running on Pantheon, we recommend leaving autocommit disabled to aid overall site performance.<\/p>\n\n<p>To enable autocommit, add the following to <code>wp-config.php<\/code> or an mu-plugin.<\/p>\n\n<pre><code>  define( 'SOLRPOWER_DISABLE_AUTOCOMMIT', false );\n<\/code><\/pre>\n\n<p>To force-commit data outside of a normal cron run, from the command line, you can run the command below or simply force a cron-run.<\/p>\n\n<pre><code>  wp solr commit\n<\/code><\/pre>\n\n<!--section=installation-->\n<p>The Solr Power plugin can be installed just like you'd install any other WordPress plugin.<\/p>\n\n<p>Because Solr Power is intended to be a bridge between WordPress and the Apache Solr search engine, you'll need access to a functioning Solr 3.6 instance for the plugin to work as expected. This plugin does not support other versions of Solr. The plugin also requires PHP 7.1 or higher.<\/p>\n\n<p>If you're using the Solr Power plugin on Pantheon, setting up Apache Solr is as easy as enabling the Apache Solr add-on in your Pantheon dashboard. Once you've done so:<\/p>\n\n<ol>\n<li>Configure which post types, taxonomies and custom fields to index by going to the <strong>Indexing<\/strong> tab of the Solr Power settings page.<\/li>\n<li>Index your existing content by going to the plugin options screen and selecting the applicable <strong>Actions<\/strong>:\n\n<ul>\n<li>\n<ul>\n<li><strong>Index Searchable Post Types<\/strong><\/li>\n<\/ul><\/li>\n<\/ul><\/li>\n<li>Search on!<\/li>\n<li>See the examples\/templates directories for more rich implementation guidelines.<\/li>\n<\/ol>\n\n<p>If you're using the Solr Power plugin elsewhere, you'll need to install and configure Apache Solr. On a Linux environment, this involves four steps:<\/p>\n\n<ol>\n<li>Install the Java Runtime Environment.<\/li>\n<li>Run <code>.\/bin\/install-solr.sh<\/code> to install and run Apache Solr on port 8983.<\/li>\n<li>Configuring Solr Power to use this particular Solr instance by setting the <code>PANTHEON_INDEX_HOST<\/code> and <code>PANTHEON_INDEX_PORT<\/code> environment variables.<\/li>\n<li>Copying <code>schema.xml<\/code> to the Solr configuration directory (a path similar to <code>solr\/conf\/schema.xml<\/code>).<\/li>\n<\/ol>\n\n<p>Alternatively, there are a couple of community-maintained Docker containers you may be able to use: <a href=\"https:\/\/hub.docker.com\/r\/kalabox\/pantheon-solr\/\">kalabox\/pantheon-solr<\/a>, <a href=\"https:\/\/hub.docker.com\/r\/kshaner\/solr\/\">kshaner\/solr<\/a>.<\/p>\n\n<p>In a local development environment, you can point Solr Power to a custom Solr instance by creating a MU plugin with:<\/p>\n\n<pre><code>&lt;?php\n\/**\n * Define Solr host IP, port, scheme and path\n * Update these as necessary if your configuration differs\n *\/\nputenv( 'PANTHEON_INDEX_HOST=192.168.50.4' );\nputenv( 'PANTHEON_INDEX_PORT=8983' );\nadd_filter( 'solr_scheme', function(){ return 'http'; });\ndefine( 'SOLR_PATH', '\/solr\/wordpress\/' );\n<\/code><\/pre>\n\n<p>** Note for Lando users **<\/p>\n\n<p>If you are using lando for development, the MU plugin is not needed. Lando auto configures everything for your local environment to connect to the docker index it maintains and if you overrite the ENV variables it will mess with that configuration.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='where%20do%20i%20report%20security%20bugs%20found%20in%20this%20plugin%3F'><h3>Where do I report security bugs found in this plugin?<\/h3><\/dt>\n<dd><p>Please report security bugs found in the source code of the Solr Power plugin through the <a href=\"https:\/\/patchstack.com\/database\/vdp\/solr-power\">Patchstack Vulnerability Disclosure Program<\/a>. The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.6.0 (December 05, 2024)<\/h4>\n\n<ul>\n<li>Adds <code>is_solr_query<\/code> filter [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/588\">#588<\/a>] (props <a href=\"https:\/\/wordpress.org\/support\/users\/sboisvert\/\">@sboisvert<\/a>)<\/li>\n<li>Fixes custom schema file path for Composer Managed and other non-standard uploads directories. [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/637\">#637<\/a>]<\/li>\n<li>Adds filter <code>solr_power_customer_schema_file_path<\/code> to specify an alternative custom schema.xml file. [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/637\">#637<\/a>]<\/li>\n<\/ul>\n\n<h4>2.5.3 (April 24, 2024)<\/h4>\n\n<ul>\n<li>Fixes a very old bug that would cause tax queries to be built incorrectly. [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/622\">#622<\/a>] (props <a href=\"https:\/\/wordpress.org\/support\/users\/offshorealert\/\">@offshorealert<\/a>)<\/li>\n<\/ul>\n\n<h4>2.5.2 (September 12, 2023)<\/h4>\n\n<ul>\n<li>Fix incompatibility with Object Cache Pro when running \"wp solr index\" [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/611\">#611<\/a>]<\/li>\n<\/ul>\n\n<h4>2.5.1<\/h4>\n\n<ul>\n<li>Fix Solr not indexing automatically [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/598\">#598<\/a>]<\/li>\n<li>Fixed issue with empty\/zero value for posts_per_page [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/599\">#599<\/a>] (props @threeiem)<\/li>\n<\/ul>\n\n<h4>2.5.0<\/h4>\n\n<ul>\n<li>Updates CONTRIBUTING.md [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/585\">#585<\/a>] [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/594\">#594<\/a>]<\/li>\n<li>Fixes typo in var which caused undefined notice [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/582\">#582<\/a>]<\/li>\n<li>Update Composer dependencies [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/576\">#576<\/a>] [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/583\">#574<\/a>] [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/584\">#573<\/a>]<\/li>\n<li>Updates security policy [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/589\">#589<\/a>]<\/li>\n<li>Disable auto-commit by default. [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/591\">#591<\/a>]<\/li>\n<\/ul>\n\n<h4>2.4.5 (April 9, 2023)<\/h4>\n\n<ul>\n<li>Fixes missing vendor\/ directory in previous release [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/580\">#580<\/a>]<\/li>\n<\/ul>\n\n<h4>2.4.4 (April 7, 2023)<\/h4>\n\n<ul>\n<li>Update Composer dependencies [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/576\">#576<\/a>] [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/574\">#574<\/a>] [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/573\">#573<\/a>]<\/li>\n<li>Fix failing tests [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/577\">#577<\/a>]<\/li>\n<li>Update tested up to version<\/li>\n<\/ul>\n\n<h4>2.4.3 (January 19, 2022)<\/h4>\n\n<ul>\n<li>Include schema.xml in release distribution [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/568\">#568<\/a>]<\/li>\n<\/ul>\n\n<h4>2.4.2 (December 2, 2022)<\/h4>\n\n<ul>\n<li>Re-add changelog heading to readme.txt [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/564\">#564<\/a>]<\/li>\n<\/ul>\n\n<h4>2.4.1 (December 1, 2022)<\/h4>\n\n<ul>\n<li>Fixes the WordPress <code>readme.txt<\/code> [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/562\/\">#562<\/a>]<\/li>\n<\/ul>\n\n<h4>2.4.0 (November 30, 2022)<\/h4>\n\n<ul>\n<li>Adds Github Actions for building tag and deploying to wp.org. Add CONTRIBUTING.md. [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/issues\/551\">#551<\/a>]<\/li>\n<li>Added SOLRPOWER_DISABLE_AUTOCOMMIT to disable autocommitting of posts, moved CHANGELOG to it's own file, added <code>$post-&gt;score<\/code> value to parsed search results [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/559\">#559<\/a>]<\/li>\n<\/ul>\n\n<h4>2.3.3 (September 28, 2022)<\/h4>\n\n<ul>\n<li>Fixes issue where options could not be saved [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/issues\/541\">#541<\/a>]<\/li>\n<li>Enforces network activation requirement for WordPress multisite [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/issues\/538\">#538<\/a>]<\/li>\n<\/ul>\n\n<h4>2.3.2 (April 1, 2022)<\/h4>\n\n<ul>\n<li>Fixes query filtering for <code>'fields' =&gt; 'id=&gt;parent'<\/code> [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/528\">#528<\/a>].<\/li>\n<\/ul>\n\n<h4>2.3.1 (March 29, 2022)<\/h4>\n\n<ul>\n<li>Adapts <code>posts_pre_query()<\/code> return values based on 'fields' argument [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/522\">#522<\/a>].<\/li>\n<\/ul>\n\n<h4>2.3.0 (March 29, 2022)<\/h4>\n\n<ul>\n<li>Removes incorrect use of <code>array_map( 'get_post' )<\/code> in <code>posts_pre_query<\/code> [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/521\">#521<\/a>].<\/li>\n<\/ul>\n\n<h4>2.2.6 (February 22, 2022)<\/h4>\n\n<ul>\n<li>Fixes PHP 8 deprecations in <code>class-solrpower-options.php<\/code> [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/513\">#513<\/a>].<\/li>\n<\/ul>\n\n<h4>2.2.5 (July 27, 2021)<\/h4>\n\n<ul>\n<li>Switches to <code>wp_strip_all_tags()<\/code> to remove style and script tag content [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/500\">#500<\/a>].<\/li>\n<\/ul>\n\n<h4>2.2.4 (May 5, 2021)<\/h4>\n\n<ul>\n<li>Introduces <code>SOLRPOWER_DISABLE_QUERY_ALT<\/code> constant for disabling setQueryAlternative behavior [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/495\">#495<\/a>].<\/li>\n<\/ul>\n\n<h4>2.2.3 (March 8, 2021)<\/h4>\n\n<ul>\n<li>Incorporates the value for <code>$_ENV['FILEMOUNT']<\/code> when indicating path for <code>schema.xml<\/code> [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/492\">#492<\/a>].<\/li>\n<\/ul>\n\n<h4>2.2.2 (December 1, 2020)<\/h4>\n\n<ul>\n<li>Updates various Composer dependencies [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/477\">#477<\/a>].<\/li>\n<li>Updates README to include detail on how to use TrieDateField for publish date [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/466\">#466<\/a>].<\/li>\n<\/ul>\n\n<h4>2.2.1 (July 13, 2020)<\/h4>\n\n<ul>\n<li>Avoids pinging Solr unless we actually need, to avoid unnecessary requests [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/458\">#458<\/a>].<\/li>\n<\/ul>\n\n<h4>2.2.0 (May 5, 2020)<\/h4>\n\n<ul>\n<li>Uses <code>posts_pre_query<\/code> hook to support use of 'fields' in <code>WP_Query<\/code> [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/448\">#448<\/a>].<\/li>\n<\/ul>\n\n<h4>2.1.4 (April 24, 2020)<\/h4>\n\n<ul>\n<li>Ensures highlighting is also applied to the post excerpt [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/446\">#446<\/a>].<\/li>\n<\/ul>\n\n<h4>2.1.3 (November 16, 2019)<\/h4>\n\n<ul>\n<li>Add <code>solr_power_ajax_search_query_args<\/code> filter to modify AJAX search query arguments [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/432\">#432<\/a>].<\/li>\n<\/ul>\n\n<h4>2.1.2 (August 28, 2019)<\/h4>\n\n<ul>\n<li>Adds <code>solr_is_private_blog<\/code> filter to allow control over whether a blog is indexed [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/423\">#423<\/a>].<\/li>\n<\/ul>\n\n<h4>2.1.1 (August 14, 2019)<\/h4>\n\n<ul>\n<li>Uses some fancy <code>composer<\/code> magic to unblock WordPress.org plugin updates [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/418\">#418<\/a>].<\/li>\n<\/ul>\n\n<h4>2.1.0 (May 22, 2019)<\/h4>\n\n<ul>\n<li>Introduces <code>solr_index_stat<\/code> filter for allowing additional information to be included [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/396\">#396<\/a>].<\/li>\n<li>Introduces <code>solr_facet_operator<\/code> filter for allowing facet operator to be overridden [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/388\">#388<\/a>].<\/li>\n<li>Ensures warning message appears when activating across the entire network [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/399\">#399<\/a>].<\/li>\n<li>Parses <code>&lt;h1&gt;<\/code> tags in Solr error response, in addition to <code>&lt;title&gt;<\/code> [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/407\">#407<\/a>].<\/li>\n<li>Fixes incorrect variable name when outputting schema error message [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/404\">#404<\/a>].<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Fix PHP 7 warning caused by bad conditional<\/li>\n<li>Ensure <code>$post-&gt;post_author<\/code> remains user ID when processing WP_Query<\/li>\n<li>Add a test case asserting that <code>post_title<\/code> and <code>post_content<\/code> are not bolded<\/li>\n<li>Update Solarium to <code>4.1.0<\/code> and other dependencies updates as needed<\/li>\n<li>Run automated tests against PHP <code>7.1<\/code><\/li>\n<li>Increase the minimum supported PHP version to <code>7.1<\/code><\/li>\n<\/ul>\n\n<h4>1.5.0<\/h4>\n\n<ul>\n<li>Adds support for queries using <code>post__in<\/code> and <code>post__not_in<\/code>.<\/li>\n<li>Clears batch cache when entire index is deleted.<\/li>\n<li>CLI: Errors early when there are no posts to index.<\/li>\n<li>Update Composer dependencies<\/li>\n<\/ul>\n\n<h4>1.4.1<\/h4>\n\n<ul>\n<li>Introduce <code>batch_size<\/code> argument for <code>wp solr index<\/code><\/li>\n<li>Ensure custom taxonomies are included in widget facets<\/li>\n<li>Mention available Docker containers in README<\/li>\n<li>Properly handle negative integers when indexing and querying<\/li>\n<li>Increase precision of <code>test_wp_query_failed_ping<\/code> to avoid racy failures<\/li>\n<li>Catch exception when <code>$search-&gt;getData()<\/code> fails<\/li>\n<li>Remove unused global imports for $current_blog<\/li>\n<li>Properly escape dismax query strings<\/li>\n<li>POST actions to <code>admin.php<\/code> in network admin<\/li>\n<li>Define checked files in PHPCS config so <code>phpcs<\/code> can easily be run<\/li>\n<li>Remove unused global imports for $current_blog<\/li>\n<li>Define checked files in PHPCS config so <code>phpcs<\/code> can easily be run<\/li>\n<li>Rename PHPCS config to correct name<\/li>\n<\/ul>\n\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>Bumps minimum supported version to WordPress 4.6.<\/li>\n<li>Updates bundled Solarium library to 3.8.1.<\/li>\n<li>Fixes Solr queries using <code>orderby=&gt;meta_value_num<\/code> [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/299\">#299<\/a>].<\/li>\n<li>Use <code>$_SERVER['HOME']<\/code> as a reliable way of finding the cert on Pantheon [<a href=\"https:\/\/github.com\/pantheon-systems\/solr-power\/pull\/314\">#314<\/a>].<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Add <code>.distignore<\/code> file for wp dist-archive solr-power<\/li>\n<li>Make Solr in the admin opt-in only using the <code>solr_allow_admin<\/code> filter<\/li>\n<li>Error early when <code>PANTHEON_ENVIRONMENT<\/code> isn't set<\/li>\n<li>Clarify error message when environment variables aren't set<\/li>\n<li>Mention copying <code>schema.xml<\/code> and supported Solr version in README<\/li>\n<li>Include original plugin attribution in the copyright notice<\/li>\n<li>Boost <code>post_title<\/code> more than <code>post_content<\/code> with sane boost values<\/li>\n<li>Add missing filter for custom fields<\/li>\n<li>Boost posts with matching titles to the top of results<\/li>\n<li>Remove duplicate options when initializing them<\/li>\n<li>Match author name in search results<\/li>\n<li>Bug fixes<\/li>\n<li>Adhere to WordPress coding standards in PHP files<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Add multisite support<\/li>\n<li>Respect all query vars when searching with <code>WP_Query<\/code><\/li>\n<li>Display error from schema submit response when Solr includes one<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Introduce a new class for managing batch indexes<\/li>\n<li>Rewrite <code>wp solr index<\/code> to provide more verbosity<\/li>\n<li>Make batch indexes resumeable by logging <code>paged<\/code> to an option<\/li>\n<li>Remove old <code>wp solr index<\/code> code<\/li>\n<li>Fire <code>solr_power_index_all_finished<\/code> action when indexing is complete<\/li>\n<li>Ensure a completion message displays after indexing is complete<\/li>\n<li>Fix a bug around Solr taking over searches in wp-admin<\/li>\n<li>Properly apply the <code>solr_allow_admin<\/code> and <code>solr_allow_ajax<\/code> filters<\/li>\n<li>Add <code>solr_boost_query<\/code> filter for boosted items<\/li>\n<li>Add <code>solr_dismax_query<\/code> filter for Dismax<\/li>\n<li>Add <code>get_post_types<\/code> and <code>get_post_statuses<\/code> helper methods<\/li>\n<li>Remove unnecessary <code>get_env<\/code> call<\/li>\n<li>Add <code>solr_post_status<\/code> filter<\/li>\n<li>Add missing <code>solr_post_types<\/code> filter to <code>get_post_types<\/code> call<\/li>\n<li>Use <code>PANTHEON_INDEX_PORT<\/code> instead of hard-coded port in curl<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Add Ajax functionality to the facet search widget<\/li>\n<li>Add date_query support to WP_Query Integration<\/li>\n<li>Allow <code>s<\/code> parameter for WP_Query when Solr is enabled<\/li>\n<li>Checks for searchable post type before indexing modified post<\/li>\n<li>Test with WordPress 4.7<\/li>\n<li>Add <code>solr_power_index_all_finished<\/code> action when indexing all posts is complete<\/li>\n<li>Allow post_title and post_content to score higher<\/li>\n<li>Make sure that integers and float values are actually of that type. Otherwise, Solr will fail to index the document.<\/li>\n<\/ul>\n\n<h4>0.6.0<\/h4>\n\n<ul>\n<li>Advanced WP_Query Integration - Meta Queries, Tax Queries<\/li>\n<li>Translatable strings standardized<\/li>\n<li>Facet query fixes<\/li>\n<li>Hide schema submit option if not on the Pantheon platform<\/li>\n<li>Added a method for API status<\/li>\n<li>Document available filters<\/li>\n<li>Fixed single quote\/character issues in the facet widget<\/li>\n<\/ul>\n\n<h4>0.5.0<\/h4>\n\n<ul>\n<li>Add facet search widget<\/li>\n<li>Update options page internals to utilize WordPress settings API<\/li>\n<li>Add Behat tests to ensure the plugin's compatibility with the Pantheon platform.<\/li>\n<li>Defork Solarium and update it to version 3.6.0<\/li>\n<\/ul>\n\n<h4>0.4.1<\/h4>\n\n<ul>\n<li>Do not allow plugin activation if the <code>PANTHEON_INDEX_HOST<\/code> or <code>PANTHEON_INDEX_PORT<\/code> environment variables are not set. Instead, show an admin notice to the user advising them to configure the environment variables.<\/li>\n<\/ul>\n\n<h4>0.4<\/h4>\n\n<ul>\n<li>Auto submission of schema.xml<\/li>\n<li>Moved legacy functions to a separate file<\/li>\n<li>PHP version check - warn in the WordPress dashboard and disable Solr Power plugin if the PHP version is less than 5.4<\/li>\n<\/ul>\n\n<h4>0.3<\/h4>\n\n<ul>\n<li>Bug fixes<\/li>\n<li>Settings page updates<\/li>\n<li>Filters for AJAX\/Admin integration<\/li>\n<li>Indexing all publicly queryable post types<\/li>\n<li>Debug Bar Extension<\/li>\n<li>Default sort option on settings page<\/li>\n<li>Initial WP CLI integration<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>Works \"out of the box\" by overriding WP_Query()<\/li>\n<li>Much improved internal factoring<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>Initial alpha release (GitHub only)<\/li>\n<\/ul>\n\n<h4>0.0<\/h4>\n\n<ul>\n<li>Note this started as a fork of this wonderful project: https:\/\/github.com\/mattweber\/solr-for-wordpress<\/li>\n<\/ul>","raw_excerpt":"Improve your user experience with the Apache Solr search engine for your WordPress website.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/40252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=40252"}],"author":[{"embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/getpantheon"}],"wp:attachment":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=40252"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=40252"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=40252"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=40252"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=40252"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=40252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}