-
Notifications
You must be signed in to change notification settings - Fork 85
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
Refactored the DeleteJob to use 'deleteObjects' instead of 'deleteBy' #334
Refactored the DeleteJob to use 'deleteObjects' instead of 'deleteBy' #334
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @simonworkhouse ,
thank you for your contribution. Apologies for the CI that didn't run as expected before, I think there's some issues with permissions for external contributors.
I was able to run the test suite with your changes, but there are still some failing tests that need to be addressed before this could be merged. Let me know if you run into any issues 🙂
Thank you in advance!
@DevinCodes No troubles, I have updated the tests to account for the updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you again for the contribution @simonworkhouse , it seems to be working as expected.
Going over the changes, I realized that this change has an impact on the usage of search operation: the deleteBy
is an indexing operation, while browse
is counted as search operation. Given that this might impact some customer's usage and billing, we may want to have this as a configurable option rather than the default behavior, which would default to using deleteBy
. WDYT?
I realize adding this option takes up more of your time, so let me know if you want a hand on adding this. Love to know your thoughts on it as well.
Thanks again!
@DevinCodes We were informed by the Algolia support team that the 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 🙂 |
… 'deleteBy' method
I have added a configuration option A check for this has been added into the ...
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for the contribution @simonworkhouse, this is looking great. I'll merge and deploy a new version first thing Monday morning!
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 #311