private SortSpec makeSortSpec () { Sort sort; // add the uri field as a fallback sorting criterion to enforce a consistent // document order if (sortCriteria != null) { sort = makeSortFromCriteria(getEffectiveSortCriteria()); } else { //sort = new Sort (SortField.FIELD_SCORE, new SortField(uriFieldName, Type.STRING)); sort = new Sort (new SortField(idFieldName, Type.LONG)); } return new SortSpec (sort, position, limit); }
sort = QueryParsing.parseSort(sortStr, req.getSchema()); return new SortSpec( sort, start, rows );
CloudQueryRequest req = new CloudQueryRequest(xqueryComponent.getCore(), params, new SortSpec(Sort.RELEVANCE, 1));