You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: Engines, like Algolia, allow to define the ranking - order of the results.
An example could be: I want products to be sorted by the quantity, so when I type "iphone" i want to get the ones that I have more in stock.
Problem: The method AlgoliaEngine::map does not return the models in the same order of the returned results by Algolia. Mainly because a whereIn is applied behind-the-scenes.
Solution: Sort the models by the same order of the given results just before returning the result of AlgoliaEngine::map.
peterpan666, timfeid, jamesgrose, MatanYadaev and joshlewis