java sorl 多字段排序

String[] sortFieldStrings = sortField.split(",");
			String[] sortOrderStrings = sortOrder.split(",");
			for (int i=0, len=sortFieldStrings.length; i<len; i++) {
				String sortFieldString = sortFieldStrings[i];
				String sortOrderString = sortOrderStrings[i];
				SortClause sortClause = new SortClause(sortFieldString, ORDER.valueOf(sortOrderString)); 
				solrQuery.addOrUpdateSort(sortClause);
			}

你可能感兴趣的:(java sorl 多字段排序)