final String sortOrder = webSocketData.getSortOrder();
final String sortKey = webSocketData.getSortKey();
final PropertyKey sortProperty = StructrApp.getConfiguration().getPropertyKeyForJSONName(AbstractNode.class, sortKey);
final Query query = StructrApp.getInstance(securityContext).nodeQuery().includeDeletedAndHidden().sort(sortProperty).order("desc".equals(sortOrder));
query.andName(searchString);
if (type != null) {
query.andType(type);
}