10up / ElasticPress

A fast and flexible search and query engine for WordPress.
https://elasticpress.io
GNU General Public License v2.0
1.23k stars 312 forks source link

wp-cli elasticpress sync does not sync all indexes #3939

Closed danielmuehlbacher closed 1 month ago

danielmuehlbacher commented 1 month ago

Describe your question

Hi there,

when executing

php wp-cli.phar elasticpress sync --force --yes

it seems only the index for the default language is synced. These two commands do not work:

php wp-cli.phar elasticpress sync --index-name=wifoacat-post-1 --force --yes php wp-cli.phar elasticpress sync --index-name=wifoacat-post-1-en --force --yes

Is there a way to sync all indexes (for all languages) via CLI?

Thank you!

Code of Conduct

felipeelia commented 1 month ago

What solution are you using to have multiple languages, @danielmuehlbacher?

danielmuehlbacher commented 1 month ago

@felipeelia Thank you for your comment. I'm using the plugin "WPML ElasticPress", which creates an own index for EN (DE is the base language).

There are two indexes: wifoacat-post-1 wifoacat-post-1-en

When running the manual sync in WP admin, everything is fine. But when running the wp-cli sync command it seems only the "wifoacat-post-1" index is synced.

felipeelia commented 1 month ago

In that case, you'll want to run their WP-CLI command, something like wp wpml_elasticpress sync --post-lang=de,en, as described here. If you have any follow up questions, I'll ask you to open an issue in that repo. Thanks!

danielmuehlbacher commented 1 month ago

@felipeelia Awesome, thanks a lot 🥇