Add server side sorting to query interface.