Works similar to Program, but receives the list of matched items and should return the same list but sorted. This can actually also be used for further filtering.