09-09-2010 04:59 AM
default: // "path"
filterParams.variablePath = false;
filterQuery = "+PATH:\"" + parsedArgs.pathNode.qnamePath + "/*\"";
filterParams.query = filterQuery + filterQueryDefaults;
//Adding sort parameters
filterParams.sort = [
{
column: "@{http://www.alfresco.org/model/content/1.0}name",
ascending: true
},
{
column: "@{http://www.alfresco.org/model/content/1.0}modified",
ascending: false
}
];
break;
The important step here is that sorting on name only works if you add one additional sort field. If you only add cm:name for sort, it is just ignored. I think (haven't tested yet) this is applicable to other javascript searches where you need to do search on fields that are multilingual and/or tokenized. I'm not sure what is the cause that only name sort fails, the issue has been reported several times in Jira, so I do not add a new issue there, but added a comment to http://issues.alfresco.com/jira/browse/ALF-4664.
08-03-2011 01:18 PM
HelloIt's already all on HEAD (i.e. it's available as part of Team and has since been merged to Community). It will be product when v4.0 is released in a couple of months or so or you can grab the code now and have a go at porting it back to v3.3 or v3.4.
Is anyone making "sort on the fly" functionality?
If someone did, and if that 'somebody' want to share with ordinary dummy users , we (ordinary dummy users ) would be very grateful if we can see a description of the proceedings and all the necessary steps …
Thank you in advance
08-04-2011 05:20 AM
12-29-2011 02:57 AM
case "datesort":
var argMax = args.max;
filterQuery = "+PATH:\"" + parsedArgs.rootNode.qnamePath + "//*\"";
filterQuery += " +TYPE:\"content\"";
filterParams.sort = [
{
column: "@cm:" + dateField,
ascending: false
}];
filterParams.query = filterQuery;
break;
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.