replace Fuse.js with Algolia for home user search #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
blocked by: laravel/framework#37080
In case you have some time @redox this is the PR to replace the current Fuse.js with Algolia & instantsearch.js
The daily re-index seems to be needed as blocked entities aren't part of the index but it's only an update call so the
laravel/scout
delete isn't called here. I will try to find a better solution.Okay, without a custom engine this won't work as https://github.com/laravel/scout/blob/7fb1c860a2fd904f0e084a7cc3641eb1448ba278/src/Engines/AlgoliaEngine.php#L46-L73 only calls
saveObjects()
. The observer https://github.com/laravel/scout/blob/7fb1c860a2fd904f0e084a7cc3641eb1448ba278/src/ModelObserver.php#L75-L88 also makes models unsearchable if they shouldn't be searchable anymore. But not the import command.Would like to know if it's bad practice to do a full daily re-index of the data? If it will consume my credits/units too fast? Or if that's okay? 馃
EDIT: the
scout:reimport
command byalgolia/scout-extended
does the same in a lot nicer way. 馃帀apply for second category of https://github.com/algolia/algolia-coding-contest
deployment commands: