wp-search-with-algolia
wp-search-with-algolia copied to clipboard
Fixes #442: Running WP_CLI command wp algolia reindex --all would clear index even if --clear flag is not specified
Fixes #442
Fixes an issue where
- The WP-CLI command without the
--clearflag would call$index->re_index( 1 ); - And
$index->re_index( 1 );would trigger the$index->create_index_if_not_existing()function - And
$index->create_index_if_not_existing()would clear the index if the index already exists (which was specifically not chosen to do when calling the CLI command).
- To see the specific tasks where the Asana app for GitHub is being used, see below:
- https://app.asana.com/0/0/1208952565138971
If you could please, undo the changes made for class-algolia-post-changes-watcher.php as that's something that WebDevStudios did a handful of releases back, and is intentional in that way. There's also not double clearing going on with that part of the codebase.
Reminder to myself later: we need to get this PR'd against a release branch and not main.
Changes in class-algolia-post-changes-watcher.php have been reverted.
Thank you sir.