Core.retrieveXPathQuery sort parameter

I want to use the method below to limit the amount of records returned with the amount parameter, however I have to also provide the parameter sort which is a map of two strings. I don't understand what to provide here, nor do I care what order the values are in the returned list, what should I use for this parameter? retrieveXPathQuery(IContext context, java.lang.String xpathQuery, int amount, int offset, java.util.Map<java.lang.String,java.lang.String> sort) * UPDATE * Thanks for your response Bas, I have implemented your solution and it is working correctly. Out of interest and in case I need to use it in the future how would I use this parameter to sort the query results?
1 answers

If you're not using sorting, I believe you can just insert new HashMap<String, String>() here. If that doesn't work, let me know.

If you want to use sorting in the query, the map's key holds the member name it should sort on and the value should be ASC or DESC to define the direction it should sort on.