The following query example is come from the page
?title = Name|
?has location city = City|
?has location country = Country|
?Category:Conference = C|
?Category:Workshop = W|
I don't know how to do it if I want to change the sort key ,in this example
is using end date, into using page names.
Could you give me a hand?
From: S Page <skierpage@ea...> - 2007-12-30 23:28:16
張致信 Michael Chang wrote:
> I don't know how to do it if I want to change the sort key ,in this
> example is using end date, into using page names.
The default sort key for semantic search if nothing else is specified is
the page title. So just remove sort= altogether and you'll get results
in page order.
If you turn on SQL debug logging (see
http://www.mediawiki.org/wiki/Manual:$wgDebugDumpSql ), look for
SMW::getQueryResult, and notice
ORDER BY `page`.page_title ASC
in a query without the sort parameter.
I found some bugs trying to sort on a column that isn't a condition in
the query, but when I updated to latest code in Subversion, they went
away! It seems you can now sort on any property.
I updated http://ontoworld.org/wiki/Help:Inline_queries#Sorting_results
(queries obviously need lots more documentation update and rewrite for 1.0).