Solr Search for WordPress
Improve your user experience with the Apache Solr search engine for your WordPress website.
Envisager une alternative
Solr Search for WordPress shows warning signs in 2026 — compare the alternatives below before installing. It runs on 100+ sites, is rated 4/5 and was last updated 2 years ago, and scores 32/100 on our health check.
- Petite base d'utilisateurs (plus de 100 installations actives)
- Très peu de critiques jusqu'à présent
- Pas de mise à jour depuis plus d'un an
- Uniquement testé jusqu'à WordPress 6,7 (le dernier est de 7,1)
Comment s'accumule-t-il ?
Côte à côte sur les installations, les mises à jour, les évaluations et le supportTéléchargements quotidiens
Les pics de téléchargement suivent généralement une nouvelle version - chaque site qui met à jour automatiquement compte comme un téléchargement.
Classements
Where Solr Search for WordPress stands todayWordPress.org Classements de recherche
Position en direct dans la recherche de plugins, Top 100| Mot-clé | Position |
|---|---|
| recherche | >100 |
Adoption de version
Part de sites actifs par version.
Répartition des notes
★★★★★★★★★★ 4 from 2 reviews
About Solr Search for WordPress
À partir du Lisezmoi officiel · v2.6.0Description
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.
- Fast results, with better accuracy.
- Enables faceting on fields such as tags, categories, author, and page type.
- Indexing and faceting on custom fields.
- Drop-in support for WP_Query with the
solr_integrateparameter set to true. - Completely replaces default WordPress search, just install and configure.
- Completely integrated into default WordPress theme and search widget.
- Very developer-friendly: uses the modern Solarium library
Développement
This plugin is under active development on GitHub:
https://github.com/pantheon-systems/solr-power
Please feel free to file issues there. Pull requests are also welcome! See CONTRIBUTING.md for information on contributing.
For further documentation, such as available filters and working with the SolrPower_Api class directly, please see the project wiki:
https://github.com/pantheon-systems/solr-power/wiki
You may notice there are two sets of tests running, on two different services:
- PHPUnit test suite against a Solr instance.
- The Behat test suite against a Pantheon site, to ensure the plugin’s compatibility with the Pantheon platform.
Both of these test suites can be run locally, with a varying amount of setup.
PHPUnit requires the WordPress PHPUnit test suite, and access to a database with name wordpress_test. If you haven’t already configured the test suite locally, you can run bash bin/install-wp-tests.sh wordpress_test root '' localhost. You’ll also need access to a running Solr instance, in order to run the unit tests against Solr.
Behat requires a Pantheon site with Solr enabled. Once you’ve created the site, you’ll need install Terminus, and set the TERMINUS_TOKEN, TERMINUS_SITE, and TERMINUS_ENV environment variables. Then, you can run ./bin/behat-prepare.sh to prepare the site for the test suite.
Note that dependencies are installed via Composer and the vendor directory is not committed to the repository. You will need to run composer install locally for the plugin to function. You can read more about Composer here
WP-CLI Support
This plugin has WP-CLI support.
All Solr Power related commands are grouped into the wp solr command, see an example:
$ wp solr
usage: wp solr check-server-settings
or: wp solr delete [<id>...] [--all]
or: wp solr index [--batch=<batch>] [--batch_size=<size>] [--post_type=<post-type>]
or: wp solr info [--field=<field>] [--format=<format>]
or: wp solr optimize-index
or: wp solr repost-schema
or: wp solr stats [--field=<field>] [--format=<format>]
See 'wp help solr <command>' for more information on a specific command.
You can see more details about the commands using wp help solr:
**NAME**
wp solr
**DESCRIPTION**
Perform a variety of actions against your Solr instance.
**SYNOPSIS**
wp solr <command>
**SUBCOMMANDS**
check-server-settings Check server settings.
delete Remove one or more posts from the index.
index Index all posts for a site.
info Report information about Solr Power configuration.
optimize-index Optimize the Solr index.
repost-schema Repost schema.xml to Solr.
stats Report stats about indexed content.<h3>WP_Query Integration</h3>
Use Solr in a custom WP_Query instead of querying a database. Add 'solr_integrate' => true to the query arguments.
NOTE: Currently, only basic queries, tax_query, meta_query and date_query are supported. See examples/example.custom_WP_Query.php for an example.
A meta_query can use the following compare operators:
'=''!=''>''>=''<''<=''LIKE''NOT LIKE''IN''NOT IN''BETWEEN''NOT BETWEEN''EXISTS''NOT EXISTS'
('REGEXP', 'NOT REGEXP', and 'RLIKE' are not supported.)
Configuration Tips
Searching by author name
To support searching by author name (e.g. where “Pantheon” would return posts authored by the “Pantheon” user), add the following to your custom schema.xml:
<copyField source="post_author" dest="text"/>
Boosting relevancy score by publish date
The following guidance can be used to extend the Solr index and modify boosts beyond just this example.
To support math functions on dates, you must add a custom schema.xml to Solr and reindex with the new schema.
Add the following to schema.xml:
<!-- Add to <types> -->
<!-- See: https://lucene.apache.org/solr/6_2_0/solr-core/org/apache/solr/schema/TrieDateField.html -->
<fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
<!-- Add to <fields> -->
<field name="post_date_iso" type="tdate" indexed="true" stored="true" required="true" />
Add the following to your functions.php file.
<?php
/**
* Hooks into the document build process to add post date field in proper format.
*/
function my_solr_build_document( $doc, $post_info ) {
$post_time = strtotime( $post_info->post_date );
// Matches format required for TrieDateField
$doc->setField( 'post_date_iso', gmdate( 'c\Z', $post_time ) );
return $doc;
}
add_filter( 'solr_build_document', 'my_solr_build_document', 10, 2 );
/**
* Hooks into query processor, Dismax, to add publish date boost.
* See: https://www.metaltoad.com/blog/date-boosting-solr-drupal-search-results
*/
function my_solr_dismax_query( $dismax ) {
$dismax->setQueryParser( 'edismax' );
$dismax->setBoostQuery( 'recip(abs(ms(NOW/HOUR,post_date_iso),3.16e-11,1,1))' );
return $dismax;
}
add_filter( 'solr_dismax_query', 'my_solr_dismax_query' );
is_solr_query Filtre
The is_solr_query filter controls whether Solr should be used for a specific query.
Paramètres :
- $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.
- $query (WP_Query): The current WordPress query object.
Return:
-
bool: true to enable Solr for the query, false to disable it.
add_filter( ‘is_solr_query’, function( $enabled, $query ) {
if ( $query->is_category( ‘news’ ) ) {
return false;
}
return $enabled;
}, 10, 2 );
Custom schema file path
By default, custom schema is sourced from wp-content/uploads/solr-for-wordpress-on-pantheon/schema.xml. This can be overridden with an absolute path using the the solr_power_customer_schema_file_path filter.
Parameters:
* $custom_schema_file_path (string): Default path to a custom schema file
Return:
* string: Absolute path to a custom schema.xml file.
add_filter('solr_power_customer_schema_file_path', function($custom_schema_file_path) {
return '/absolute/path/to/schema.xml';
});
Common issues
- Failing to post the schema.xml will result in an error during indexing, “Missing
post_date_isofield.” - If you have the field and type in the schema, but don’t add the
solr_build_documentfilter, you will get a similar error. - If the
post_date_isofield is missing from the index, Solr will ignore this boost and return regular results. - Trying to use a regular date field for the boost query will result in an error in the request instead of results.
Explicit Commit vs Autocommit
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.
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.
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.
To enable autocommit, add the following to wp-config.php or an mu-plugin.
define( 'SOLRPOWER_DISABLE_AUTOCOMMIT', false );
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.
wp solr commit
Installation
The Solr Power plugin can be installed just like you’d install any other WordPress plugin.
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.
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:
- Configure which post types, taxonomies and custom fields to index by going to the Indexing tab of the Solr Power settings page.
- Index your existing content by going to the plugin options screen and selecting the applicable Actions:
-
- Index Searchable Post Types
-
- Search on!
- See the examples/templates directories for more rich implementation guidelines.
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:
- Install the Java Runtime Environment.
- Run
./bin/install-solr.shto install and run Apache Solr on port 8983. - Configuring Solr Power to use this particular Solr instance by setting the
PANTHEON_INDEX_HOSTandPANTHEON_INDEX_PORTenvironment variables. - Copying
schema.xmlto the Solr configuration directory (a path similar tosolr/conf/schema.xml).
Alternatively, there are a couple of community-maintained Docker containers you may be able to use: kalabox/pantheon-solr, kshaner/solr.
In a local development environment, you can point Solr Power to a custom Solr instance by creating a MU plugin with:
<?php
/**
* Define Solr host IP, port, scheme and path
* Update these as necessary if your configuration differs
*/
putenv( 'PANTHEON_INDEX_HOST=192.168.50.4' );
putenv( 'PANTHEON_INDEX_PORT=8983' );
add_filter( 'solr_scheme', function(){ return 'http'; });
define( 'SOLR_PATH', '/solr/wordpress/' );
** Note for Lando users **
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.
Journal de modifications
Changes the default auto-commit behavior to disabled. See the README for instructions for keeping enabled.
2.6.0 (December 05, 2024)
- Adds
is_solr_queryfilter [#588] (props @sboisvert) - Fixes custom schema file path for Composer Managed and other non-standard uploads directories. [#637]
- Adds filter
solr_power_customer_schema_file_pathto specify an alternative custom schema.xml file. [#637]
2.5.3 (April 24, 2024)
- Fixes a very old bug that would cause tax queries to be built incorrectly. [#622] (props @offshorealert)
2.5.2 (September 12, 2023)
- Fix incompatibility with Object Cache Pro when running “wp solr index” [#611]
2.5.1
- Fix Solr not indexing automatically [#598]
- Fixed issue with empty/zero value for posts_per_page [#599] (props @threeiem)
2.5.0
- Updates CONTRIBUTING.md [#585] [#594]
- Fixes typo in var which caused undefined notice [#582]
- Update Composer dependencies [#576] [#574] [#573]
- Updates security policy [#589]
- Disable auto-commit by default. [#591]
2.4.5 (April 9, 2023)
- Fixes missing vendor/ directory in previous release [#580]
Pour les développeurs
Est-ce votre plugin ? Montrez les chiffres.
Ajoutez un badge en direct à votre site, docs ou github readme. Il se met à jour par lui-même - aucun compte n'est nécessaire.
Best Solr Search for WordPress alternatives
All search plugins →FAQ
Solr Search for WordPress: quick answers
Réponses directes, extraites des données en direct WordPress.org.
Source : WordPress.org
Is Solr Search for WordPress free?
Yes. Solr Search for WordPress is free to download and use from the official WordPress.org plugin directory.
Is Solr Search for WordPress safe to use in 2026?
Solr Search for WordPress shows warning signs in 2026 — compare the alternatives below before installing. It runs on 100+ sites, is rated 4/5 and was last updated 2 years ago, and scores 32/100 on our health check.
How many websites use Solr Search for WordPress?
Solr Search for WordPress is active on 100+ WordPress websites and has been downloaded 105,202 times since it launched in November 2015. It was downloaded 1,525 times in the last 30 days.
Does Solr Search for WordPress work with WordPress 7.1?
Solr Search for WordPress is officially tested up to WordPress 6.7.12, while the latest release is 7.1.5. It may still work, but try it on a staging site first.
What PHP version does Solr Search for WordPress need?
Solr Search for WordPress requires PHP 7.1 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was Solr Search for WordPress last updated?
The latest version, 2.6.0, was released on December 9, 2024 (2 years ago).
Who makes Solr Search for WordPress?
Solr Search for WordPress is developed and maintained by Pantheon Systems.
What are the best alternatives to Solr Search for WordPress?
The most popular alternatives to Solr Search for WordPress are Search Regex (100K+ installs), Relevanssi – A Better Search (100K+ installs) and Search & Replace (100K+ installs).
Propulsé par PageForge
Un modèle et une feuille de calcul. Une vraie page pour chaque recherche.
PageForge transforme chaque ligne d'un CSV en une page WordPress avec son propre titre, URL, SEO et schéma, construit sur la mise en page que vous Déjà conçu. Gratuit sur WordPress.org.
- CSV et XLSX, plus Google Sheets sur les professionnels et les entreprises
- Son propre titre, URL, SEO champs et schéma pour chaque page
- Fonctionne avec l'éditeur de blocs, Elementor, Divi et Avada
- Gratuit sur WordPress.org, pas de carte de crédit
