I am working on an enterprise app that returns quite a few results from search. The users wanted to have lazy loading on the search results but also require sorting. My devs tell me the sort will not be accurate until the user has scrolled through all the results so they are all loaded.

I'm out of ideas on how to deal with this situation. Anyone encountered this before?


  • 1
    I guess you fetch the results which are sorted. It is not dependent on sorting.
    – Sol
    May 12 '16 at 13:41
  • What content needs to be loaded/shown per item? It might be a solution to load the whole list + sortable tags, and lazy-load description and images. May 12 '16 at 17:33

Not actually an UX question... Your devs are half-wrong, since sorting & pagination might be actually performed by DB. When using LINQ, for example the following expression:

var persons = (from p in container.Persons
               where p.Age >= 18 && p.Sex == Sex.Female
               orderby p.Distance ascending
               select p)

will translate to an SQL that will be executed by DB and only records 1000-1049 are sent to you, if scrollbar location suggests that you need those indices. However in case of other forms of storage they might actually be correct, and you need to load all the data before you sort it.


This question has 2 dimensions: one of them totally off topic (the implementation side) and the other being the UX side. Luckily, even the implementation side has been covered by Wojciech's answer.

As for the UX part: technically, it can be done. But the question is: why would you want to do this?

See, the idea of searching is to display results based on user's input, including string, but whenever possible, including sorting and filtering as well, as in your case. If everything goes as expected, the user will be able to access certain information s/he was looking for.

So, you're asking to sort something that hasn't been completed, providing the user with a partial information output that might or might not be what the user was searching for.

Even worse: let's say the user went through some results and lazy loads, and clicks one result. After that, s/he wants to get back to the original results' list because there was something that could be more accurate. Surprise! Now the result is gone and the user has to repeat the loading again until s/he hopefully finds the desired result (or not!)

Please make no mistake, I have seen sites doing this, specially on e-commerce, but it doesn't mean it's correct. You're basically telling the user s/he doesn't have any locus of control and that you don't care at all. Furthermore, you're doing things on purpose so this locus of control is lost.

In short

You can do it, and it's technically possible. But I strongly suggest you deal with proper navigation where users can go back and forth as needed with minimal friction

Not the answer you're looking for? Browse other questions tagged or ask your own question.