-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing documentation on how to handle replicas #348
Comments
We're running into the same issue here with a couple of projects that rely on replicas. Thanks for the workaround @MaSpeng. It's not really ideal, but at least something we can work with in the meanwhile. I really hope that the search bundle can be improved to better handle replicas so that we can export the entire index graph with all of its replicas and its corresponding configurations, so that setting up an entire environment is as easy as running a single command. Right now we're following the workaround and have to remove the |
This really should get some attention. The fix provided does not work when working with prefix. ex: algolia_search.yaml algolia_search:
prefix: '%env%'
indices:
- name: products_price_asc
class: App\Entity\Product\Product
index_if: isSearchable
- name: products
class: App\Entity\Product\Product
index_if: isSearchable running products-settings.json {"replicas": ["dev_products_price_asc"]} products-price-asc-settings.json {"primary": ["dev_products"]} Unfortunately, when you try to push that when in prod environment, those prefixed replicas/primary fields will throw an error. |
Another note, after a bit of investigation: Issue would be possible to fix by replacing DI of Temporary solution would be to remove final at least, but ideally implement interface and base DI on that. This would allow us to extend the command with replica functionality. |
Would allow us to implement our own SettingsManager that supports replicas. algolia#348
Would allow us to implement our own SettingsManager that supports replicas. #348
My addition wasn't in anyway fixing the issue, it was just enabling us to patch it until the solution is ready. The ticket should be open as it is still missing functionality, even that is super needed. |
You're right, it got closed automatically because of the |
Description
The current documentation about the integration of the search bundle is missing how to handle replicas the right way.
I was able to sort some steps out and bypass the issue which is mentioned in: #269.
My target is to provide an index with multiple replicas and distinct sort configurations, aside from that it must me possible to export all index settings and apply them during an application deployment.
1. Backup and restore index configurations using the cli search:settings:backup:
To also export the configurations of the replicas, it is required to list them all one by one in the algolia_search.yaml as seen down in the section "Steps To Reproduce".
2. Import data into an index using the cli search:import:
To bybass this issue it is required to provide the
--indices
option with the name of the master index. It is also required that the master index has to be the last which is configured in the algolia_search.yaml. This is the mentioned bypass for the issue: #269.Steps To Reproduce
Example algolia_search.yaml to show how it is currently possible to use replicas with the search bundle.
Summary
I would really like to see additional informations about this in the official documentation on how to do it the right way.
Also i would really appreciate further improvements in the search bundle to either be able to avoid the requirement to configure each replica or to be able to provide a specific configuration for them and also a proper handling for replicas in the cli to avoid unwanted exceptions during import.
The text was updated successfully, but these errors were encountered: