WPSOLR provides three methods to index your post types in Elasticsearch or Apache Solr:
– Real-time: as soon a post type is changed (created, updated, trashed …).
– Batch: all changed post types are indexed on a click of a button.
– Cron Scheduling: your favorite scheduler (Crontab or other) calls a JSON API to index all changed post types.
This documentation describes the many features of Crontab indexing with the Cron Scheduling extension:
– Setup a Cron, or several Crons (select the indexes, select incremental vs full, select to delete before indexing)
– Generate and call Cron’s JSON API. Set the security authentication.
– See Cron log JSON properties (time to index, errors, which indexes, how many docs indexed per index)
– Stop a running Cron Manage “Cron vs Cron” deadlocks
– Manage “Cron vs Cron” deadlocks
– Manage “Cron vs batch” deadlocks
- Select the “Extensions” menu
- Select the “Cron scheduling” extension menu
- Click to activate the extension
- Click to create a new Cron. You can create several Crons, for instance to index several indexes at different intervals.
- Enter a name for the new Cron
- Enter a password to protect the Cron’s JSON API
- Click to open the Cron’s command line
- Copy the Cron’s command line, and use it anywhere, for instance in a Unix Crontab file
- Click to show the Cron’s last call logs
- Select one or several indexes to include in the Cron
- Enter the number of data to include in each call to the search engine dutin the Cron’s indexing
- Decide if you want to delete the index content before starting the indexing
- Select the indexing mode:
– No indexing (for instance just to clean the index)
– Full re-indexing (all the data is reindexed)
– Incremental indexing (only updated/new data in indexed)
- Select the post types to include in the Cron’s indexing
- Click to show the Cron’s index last call log
- Save the Cron
Executing a Cron
- Copy the cron command as seen previously
- Execute it
- Check log as an output from the command line
- Or check the last log on the Cron’s definition logs