public void setSorting(Sorting sorting) {
        if (sorting == null || sorting.fieldOrders().isEmpty()) {
            this.sorting = null;
        } else {
            this.sorting = sorting;
        }
    }
Sets how this query should be sorted. Set to null to turn off explicit sorting.
container-search/src/main/java/com/yahoo/search/query/Ranking.java