You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using it with the Fluent module, some questions have come up regarding the configuration with multiple indexes per language (as this is also recommended as the preferred method in the README).
However, we have the following question:
The 'includeClasses' parameter allows control over which classes are indexed. In our case, 'SiteTree'.
The 'includeFilter' parameter allows further refinement of which records end up in the index in Algolia.
Since the Fluent module in SilverStripe stores the locale of objects in a separate table (SiteTree_Localised), and the 'includeFilter' parameter only allows for a simple 'WHERE' query, we are wondering how each individual index per language can now be specified in the YAML configuration through this setup.
Here is our current configuration, which of course doesn't work:
No one can help or have any tipps? I would be very grateful for some suggestions!
@wilr, would extending the 'includeFilter' function be an option or a step in the right direction? @knirb, I assume that this only worked in your example because you were also using the subsite module in parallel?
Sorry @mkekit I can't say I use fluent or know how it's internal data is structured as to what the best way to do this would be. I wonder if it would work if you managed this in your _config.php file
if (isset($_ENV['locale'])) {
$locale = $_ENV['locale'];
FluentState::singleton()->setLocale($locale);
// update ALGOLIA_PREFIX_INDEX_NAME with the local$prefix = Environment::getEnv('ALGOLIA_PREFIX_INDEX_NAME');
Environment::setVar($prefix . '_'. $locale);
}
Hello, and thank you for creating the module!
While using it with the Fluent module, some questions have come up regarding the configuration with multiple indexes per language (as this is also recommended as the preferred method in the README).
However, we have the following question:
Since the Fluent module in SilverStripe stores the locale of objects in a separate table (SiteTree_Localised), and the 'includeFilter' parameter only allows for a simple 'WHERE' query, we are wondering how each individual index per language can now be specified in the YAML configuration through this setup.
Here is our current configuration, which of course doesn't work:
Could you perhaps post an example?
Many thanks and best regards!
The text was updated successfully, but these errors were encountered: