Closed prichey closed 3 years ago
I'll have a look at this soon, there's indeed a lot changed that needs individual attention (since there's no tests yet on this repo)
I'm not sure if I got these changes right, but I think you got rid of the top-level enablePartialUpdates, is that on purpose?
@Haroenv I realize it kind of looks like that but I actually just pass the whole config
object (which is the settings passed to the plugin) from onPostBuild
(here) to runIndexQueries
(here) which is where enablePartialUpdates
is actually destructured and utilized.
I'm running my fork on a project and I'm successfully merging 8 queries to the same index, all with partial updates:
[Algolia] 8 queries to index
[Algolia] Running 8 queries for index MC_DEV...
[Algolia] Queries resulted in a total of 2213 results
[Algolia] Starting Partial updates...
[Algolia] No updates necessary; skipping!
[Algolia] Done!
Let me know if you have any other questions / concerns, thanks!
Ah yes that makes sense, in my mind it was a separate enablePartialUpdates from the queries array, but you're right!
@Haroenv thanks for the review, I'll address comments then let you know once I'm all pushed up
@Haroenv I addressed your comments, let me know what you think. Thanks!
I'm submitting this because I reworked a decent amount of the plugin to be compatible with multiple queries to the same index. It seems to work well for my use case but the diff is fairly gnarly so I'm not sure if you'd like to pull this in or not. I'm happy to rework anything if you are interested in merging, but if not I can just maintain my fork and use the patched version for my needs. Let me know what you think, thanks!