Closed simonworkhouse closed 4 months ago
@DevinCodes No troubles, I have updated the tests to account for the updated DeleteJob
behaviour.
@DevinCodes We were informed by the Algolia support team that the deleteBy
operation had been deprecated, is that not the case? Or is that perhaps just for the new "NeuralSearch" infrastructure? To be honest, I wasn't able to find that documented anywhere but the support team were adamant that it is the case.
Yes, it's probably a good idea to have it set up as a configurable option regardless, but maybe I'll first triple check with the support team just to make sure that they aren't confused.
It is deprecated only for the new infrastructure indeed: plans on the old infra should still have access to this operation 🙂
I have added a configuration option scout.algolia.use_deprecated_delete_by
that controls whether or not to use the deprecated deleteBy
method. Tests have also been updated to account for both methods of deletion.
A check for this has been added into the DeleteJob
with a default fallback value of true
so that it does not change existing behaviour.
...
if (config('scout.algolia.use_deprecated_delete_by', true)) {
...
I did also consider the possibility of implementing and dispatching a new Job class instead, but rejected that idea due to the potential for breaking backwards compatibility. It would have potentially caused issues if someone is either manually dispatching DeleteJob
s or if they have extended that class.
This is released and available in v3.0.1! Thank you again for your contribution!
Describe your change
This change is to account for the fact that the 'deleteBy' method has been deprecated on the new NeuralSearch infrastructure.
We have been advised of this by the Algolia support team and they have stated that it's a requirement in order to use the new infrastructure.
This update should also address the issue outlined in https://github.com/algolia/scout-extended/issues/311