Integrations / Frameworks / Symfony / Managing settings
Jan. 14, 2019

Managing settings

Backup and restore settings

This bundle has a simple approach to settings management, everything is centralized in json files. Each engine must provide a SettingsManager class that can backup settings from the engine and push them back.

The bundle offers 2 commands to easily backup and restore settings

1
2
php bin/console search:settings:backup --indices:posts,comments
php bin/console search:settings:push --indices:posts,comments

The --indices option take a comma-separated list of index names (without prefix, as defined in configuration). If no options are passed all indices will be processed.

Settings directory

Depending on your version of Symfony, the settings will be saved in different locations:

  • Symfony4: /config/settings/algolia_search/
  • Symfony3: /app/Resources/SearchBundle/settings/

The settings directory can also be set in the configuration if you have a non-standard setup or if you wish to save them elsewhere. The project directory will automatically be prepended.

1
2
algolia_search:
    settingsDirectory: app/search-settings/

Did you find this page helpful?