Skip to content

Conversation

@akhrarovsaid
Copy link
Contributor

@akhrarovsaid akhrarovsaid commented Oct 21, 2025

What?

This PR adjusts the docKey used in syncDocAsSearchIndex to consider configured locales. The existing behavior prevents reindexing from saving locales outside of the default locale. With this PR, the plugin successfully reindexes all configured locales.

Why?

To allow all configured locales to be reindexed as expected.

How?

  • Checking if the pluginConfig includes locales and, if so, sets the docKey to include the syncLocale being used
  • Correcting type for pluginConfig in SyncWithSearchArgs to be SanitizedSearchPluginConfig
  • Adding an int test to demonstrate reindexing all configured locales as default behavior

Fixes #14276

Before:

2025-10-21.11-20-37.mp4

After:

Search-Results---Payload--after.webm
@JarrodMFlesch
Copy link
Contributor

Dang wish I would have seen this before the release today. Thanks for this!

@JarrodMFlesch JarrodMFlesch merged commit c29e1f0 into payloadcms:main Oct 23, 2025
100 checks passed
@akhrarovsaid akhrarovsaid deleted the fix/search-sync-all-locales branch October 23, 2025 19:57
@github-actions
Copy link
Contributor

🚀 This is included in version v3.61.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants