Ciao all,
I'm querying the browser history following:

http://developer.mozilla.org/en/Querying_Places

(BTW, thanks a million, fantastic improvement respect to
the old RDF-based framework...)

If I set the result type as URI, everything works as expected
according to the sorting mode I use. For example:

var history = Cc["@mozilla.org/browser/nav-history-service;
1"].getService(Ci.nsINavHistoryService);
var options = history.getNewQueryOptions();
options.resultType = options.RESULTS_AS_URI;
options.sortingMode = options.SORT_BY_DATE_DESCENDING;
var query = history.getNewQuery();
var result = history.executeQuery(query, options);
....

returns the properly date-sorted list of all visited URIs.

But if I set the result type as RESULTS_AS_SITE_QUERY,
my sorting mode seems to be ignored. That is, I correctly
get all the domains where I have visits, but they are sorted
alphabetically regardless of the sorting mode. My guess is
that the sorting mode is used to sort the URIs within
each domain, but I was expecting (or hoping...) that the
domains were sorted as well. In other words, I was expecting
that the first domain in the result container is the domain
associated with the URI visited last (or first, or most, ..),
and so on.

Is there a way to apply some sorting to the RESULTS_AS_SITE_QUERY
type, or what I am asking is plain silly?

Thanks in advance as usual

m