pantheon-systems / solr-power

A WordPress plugin to connect to Pantheon's Apache Solr search infrastructure, or your own!
https://wordpress.org/plugins/solr-power/
GNU General Public License v2.0
126 stars 60 forks source link

[BUGS-5309] Add option for disabling commits to Solr #549

Closed ryanshoover closed 1 year ago

ryanshoover commented 1 year ago

The Pantheon platform will auto-commit any changes to the Solr index every 2 minutes. Since Pantheon already does a hard commit, Solr Power doesn't need to.

This adds a new option to enable soft commits when writing to Solr. The option can be useful on large, active sites that publish posts multiple times a minute (like news organizations).

This adds a new option to disable commiting when writing to Solr. The option can be useful on large, active sites that publish posts multiple times a minute (like news organizations).

A site would just add this to wp-config to enable the new feature.

define( 'SOLRPOWER_DISABLE_COMMIT', true );
ryanshoover commented 1 year ago

cc @Hornswoggles

ryanshoover commented 1 year ago

@Hornswoggles has pointed out that Solr 3.6.1 doesn't support soft commiting. Pantheon WP sites currently have to run 3.6.1 until we can update this plugin to support Solr 8.

I can change the flag's behavior to disable committing entirely. That can get high-update sites working better now.

When we get Solr 8 support, I would think we'd want to soft commit changes rather than avoid committing altogether. At that point, we'd need a lot more finesse to handle committing, as the behavior would change based on the solr version and the commit flag.

Thoughts @jazzsequence ?

jazzsequence commented 1 year ago

That makes sense to me. Disabling committing sounds like the best option for now. I don't know that we have an open issue in CMS Eco for updating the plugin to support Solr 8 so I will get that card written up.

ryanshoover commented 1 year ago

@jazzsequence updated the PR to disable committing entirely with the flag.

stovak commented 1 year ago

replaced by https://github.com/pantheon-systems/solr-power/pull/559