Dual write to two Elasticsearch clusters

Hello, I have a cluster (v1.22.4) with persistence store (cassandra) and visibility store (elasticsearch). Now I would like to migrate the ES to a new one. So I added the secondary visibility store.

defaultStore: 'default',
visibilityStore: 'visibility',
secondaryVisibilityStore: 'secondary-visibility',
datastores: {
  default: {
    driver: 'cassandra',
    cassandra: ...
  visibility: {
    elasticsearch: ...
  'secondary-visibility': {
    elasticsearch: ...

But I got this error:

config validation error: persistence config: cannot set secondaryVisibilityStore or advancedVisibilityStore when visibilityStore is setting elasticsearch datastore

According the document, I expected this configuration should work.

The following combinations are allowed in a Dual Visibility setting.

Primary Secondary
Standard (Cassandra or SQL) Advanced (SQL or Elasticsearch)
Advanced (SQL) Advanced (SQL)
Advanced (Elasticsearch) Advanced (Elasticsearch)

Please correct me if I’m wrong. Thanks in advance.