-
Notifications
You must be signed in to change notification settings - Fork 340
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
->searchable() update everything to Algolia, even with no changes #226
Comments
If you want to achieve that, you will need to keep track locally of what's in Algolia index and I guess it can become pretty tricky. You might be able to do something based on the |
By nature this is how Elasticsearch works.
So if you run https://www.elastic.co/guide/en/elasticsearch/guide/current/partial-updates.html Note the latest version of Elasticsearch 6.0 introduces breaking changes! They are removing support for |
I think it would be an idea to use the But I've solved it the same - I check if there is any searchable value in dirty state, otherwise I ignore this model. |
I might be missing something, but is there a reason the
and then Or at least have a configuration option to enable/disable the above logic? Edit: After reading all the comments, I see where this could cause algolia to be out of sync(I personally would rather have this than all the API calls), so I will just end up doing this in a custom engine. |
I have created a custom engine for it |
Gonna close this for the same reasons as in #285 and mentioned above. |
I'm using Laravel 5.3 and MongoDB database.
If I run ->searchable() in my model, I resend everything to Algolia, even when there is no changes. Incurring in charges in Algolia.
Is that normal?
This is not supposed to update only if there is any change?
I'm trying this because in some cases my items are not being updated in Algolia when I save it in my database, I don't know if it's related to MongoDB or to Scout. In any case I think there should be a way to update the index completely but only when the document is different to your local one.
The text was updated successfully, but these errors were encountered: