algoliasearch-rails
algoliasearch-rails copied to clipboard
Settings for add_slave inside add_index
Hi just a sanity check, in the DSL, it looks like when I add_slave
inside of an add_index
block, all the settings are ignored.
Just digging around a little bit, should something be done with the block
here? https://github.com/algolia/algoliasearch-rails/blob/2d63c37ed6151e314e5479e6a102d1f48e23cd4f/lib/algoliasearch-rails.rb#L246
I did a little more digging yesterday, seems like the settings for the slaves of added indexes never get applied when they're all getting looped through... will have to do some more source diving to track down where that might need to change.
Hi just a sanity check, in the DSL, it looks like when I add_slave inside of an add_index block, all the settings are ignored.
Arg indeed, I don't think this is supported :/ We should patch the DSL to forbid it.
Does it mean you're targeting several indices (with slaves) from a single model @robertjwhitney ?
@redox yep exactly. I need to right now for legacy support on some clients, but would like to migrate away eventually.
Is there a good way we could add support? Seems like a pretty valid use-case?
Is there a good way we could add support? Seems like a pretty valid use-case?
I need to check whether this has a big impact or not; the current replica
handling is a bit messy and would eventually need to a full rewrite (gem was designed when replicas were not introduced yet).
I'm not confident providing any ETA; and I would recommend going for custom ruby
code to set the settings & use the index.
Cool, well, I'm happy to help it along if you come up with a plan for doing that. Replica's are a pretty important feature, and we'd love to have full support!