Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Our wait time is higher than usual, please make sure you are meeting the minimum requirement - https://wpml.org/home/minimum-requirements before you report issues, and if you can take a look at current Known Issues - https://wpml.org/known-issues/. Thank you.
Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 5:00 – 13:00 5:00 – 13:00 5:00 – 13:00 5:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Tagged: 

This topic contains 0 replies, has 1 voice.

Last updated by Otto 3 days, 15 hours ago.

Assisted by: Otto.

Author Posts
March 31, 2025 at 7:01 pm #16880669

kenM-6

Background of the issue:
I am trying to index 3 languages using WPML Elasticpress with the command: wp wpml_elasticpress sync --setup --post-lang=en,es,zh-hans. I expected to see three indices: one English, one Spanish, and one Chinese.

Symptoms:
I encountered an error: 'Error: Mapping failed: It seems you have reached the limit of indices your plan supports and we were not able to create a new index. Currently, you can have up to 3 indices.' In my ElasticPress account, I see 1 index populated (English) and 2 other indices listed with 0 posts populated, including a language (French) we did not try to index. After manually deleting the empty indices and trying to sync a single language with wp wpml_elasticpress sync --post-lang=es, I received the same error.

Questions:
Why am I receiving an error about reaching the limit of indices when I try to index multiple languages?
How can I successfully index the Spanish and Chinese languages without encountering errors?

April 2, 2025 at 2:00 pm #16887484

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

To ensure the quickest and most accurate support, please provide your debug information so I can look at some of your configurations. We have an excellent article on how to locate it here: https://wpml.org/faq/provide-debug-information-faster-support/.

It may be related to this:
https://wpml.org/errata/wpml-elasticpress-support-for-the-documents-search-feature/

Can you please disable the Documents feature and check it?

Best Regards,
Otto

April 2, 2025 at 7:02 pm #16888664

kenM-6

I supplied the debug information. We do not have documents on. We have not had it on since the beginning, so this bug is occurring without that feature enabled. Thanks

April 2, 2025 at 8:32 pm #16888951

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Thanks.

I am checking with our second-tier support, I'll get back to you as soon as I have news.

Best Regards,
Otto

April 3, 2025 at 4:37 pm #16894169

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

I checked, and this is expected.

The WPML Elasticpress plugin creates an index per language. Then you can choose what to index per language, but the indices are always created.

We will check this with the development team to see if they may consider a feature request to change the behavior. But I can't promise that it will be done or when.

Best Regards,
Otto

April 3, 2025 at 9:27 pm #16894847

kenM-6

A change of behavior would be great. In our case this is stopping us from indexing even just 1 other language. Ideally we could make use of our 3 indices by having one for english + 2 other languages. But the way this works now does not allow that.

If I try to index one language, using a command meant to do just that, for example:

wp wpml_elasticpress sync --post-lang=es

it doesn't make sense that it should try to index all languages and cause it to fail.

This:

wp wpml_elasticpress sync --setup

is meant to index all languages. I would understand the current behavior with the latter command but it should not be the case with the former.

April 4, 2025 at 2:02 pm #16897935

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Yes, the behaviour you described seems reasonable. Not sure about the implementation details. Our dev team will decide, taking into account the big picture.

At this point, the options are a server that allows more indices or custom coding, which is outside the scope of our support.

As a general guide/idea, the indices are created here:
wp-content/plugins/wpml-elasticpress/src/Manager/Indices.php:

		add_filter( 'ep_index_name', [ $this, 'filterIndexName' ], 10 );
		add_filter( 'ep_global_alias', [ $this, 'filterIndexName' ], 10 );
...

	public function filterIndexName( $indexName ) {
		if ( $this->currentIndexLanguage === $this->defaultLanguage ) {
			return $indexName;
		}
		if ( empty( $this->currentIndexLanguage ) ) {
			return $indexName;
		}
		return $indexName . '-' . $this->currentIndexLanguage;
	}

Commenting out the filters only creates one index in the default language. But I can't tell about how this will work with the multilingual search feature. It's just a starting point.

At this point, I would suggest you consider contacting one of our certified partners from this link: http://wpml.org/documentation/support/wpml-contractors/
You will get the custom assistance you need to get on with your project.
Before doing so please have a look also here:
http://wpml.org/documentation/support/wpml-contractors/guidelines-for-people-looking-for-consulting-help/"

Best Regards,
Otto