// if no constraints, don't do a search...
if (UtilValidate.isNotEmpty(contentSearchConstraintList)) {
// if the search options have changed since the last search, put at the beginning of the options history list
ContentSearchSession.checkSaveSearchOptionsHistory(session);
ResultSortOrder resultSortOrder = ContentSearchOptions.getResultSortOrder(request);
ContentSearchContext contentSearchContext = new ContentSearchContext(delegator, visitId);
contentSearchContext.addContentSearchConstraints(contentSearchConstraintList);
contentSearchContext.setResultSortOrder(resultSortOrder);