raffffffff
raffffffff

Reputation: 3537

Algolia set master index for a slave

I have 2 indices named items_au and items_us

I created these two indices using public $indices = ['items_au', 'items_us'];

In my algoliaSettings I am creating 3 slaves for each index:

public static $perEnvironment = true;

public $algoliaSettings = [
  'slaves' => [
        'items_au_by_price_asc',
        'items_au_by_price_desc',
        'items_au_by_views',

        'items_us_by_price_asc',
        'items_us_by_price_desc',
        'items_us_by_views'
    ]
]

I wanted the master index of indices starting with items_au to be items_au_local and the others to reference items_us_local.

Currently, all the slaves have items_au_local as their master slave. I tried using masterIndex but it doesnt work.

Upvotes: 3

Views: 174

Answers (1)

Max
Max

Reputation: 251

The extension is not able to handle that. The easiest would be to handle slaves via the api client directly by doing a setSettings call for both items_us and items_au

Upvotes: 1

Related Questions