Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGS-6558] Fix Solr not indexing #598

Merged
merged 4 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Changelog ##

### 2.5.1-dev ###
* Fix Solr not indexing automatically [[#598](https://github.com/pantheon-systems/solr-power/pull/598)]

### 2.5.0 ###
* Updates CONTRIBUTING.md [[#585](https://github.com/pantheon-systems/solr-power/pull/585)] [[#594](https://github.com/pantheon-systems/solr-power/pull/594)]
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pantheon-systems/solr-power",
"description": "An open source plugin to connect to Pantheon's Apache Solr search infrastructure, or your own!",
"type": "wordpress-plugin",
"license": "GPLv2 or later",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Pantheon",
Expand Down
4 changes: 1 addition & 3 deletions includes/class-solrpower-sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,13 @@ function post( $documents, $commit = true, $optimize = false ) {
if ( $commit && $this->should_commit() ) {
syslog( LOG_INFO, 'telling Solr to commit' );
$update->addCommit();
$solr->update( $update );
}

if ( $optimize ) {
$update = $solr->createUpdate();
$update->addOptimize();
$solr->update( $update );
syslog( LOG_INFO, 'Optimizing: ' . get_bloginfo( 'wpurl' ) );
}
$solr->update( $update );
wp_cache_delete( 'solr_index_stats', 'solr' );
} else {
syslog( LOG_ERR, 'failed to get a solr instance created' );
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ Please report security bugs found in the source code of the Solr Power plugin th
== Changelog ==

= 2.5.1-dev =
* Fix Solr not indexing automatically [[#598](https://github.com/pantheon-systems/solr-power/pull/598)]

= 2.5.0 =
* Updates CONTRIBUTING.md [[#585](https://github.com/pantheon-systems/solr-power/pull/585)] [[#594](https://github.com/pantheon-systems/solr-power/pull/594)]
Expand Down