Skip to content
Matthew Boynes edited this page Aug 12, 2015 · 2 revisions

In order for Elasticsearch to use your data, it needs to index it. That is to say: analyze, process, and store its own copy in the format that it requires. This requires transforming your data to a compatible format, but SearchPress makes this a seamless process.

There are two parts to indexing data: the initial index of all existing content, and the ongoing index of all changes. The ongoing index of all changes is something that happens any time a post is added, updated, or deleted, and it is something you should never have to think about. You have two options for the initial bulk index:

Indexing via WP-CLI

The recommended method for indexing posts is via WP-CLI if it is available. This will be significantly faster than using the GUI, and it should be able to process about 2,000 posts per minute (depending on infrastructure and network latency).

The most common command to do a full index or re-index of the site is:

wp searchpress index --flush --put-mapping

Read more about indexing with WP-CLI on the WP-CLI Commands page.

Indexing via the WordPress Admin

While the suggested route for indexing data is via WP-CLI, that requires knowledge of the command line, requires SSH access to the server, and for other reasons it may simply not be an option. The SearchPress Settings page has a tab that will allow you to index your data via the click of a button. It will process roughly 250-500 posts per minute using wp-cron.