The links would be sorted first by Title, then description, then URL in ascending order. If you want descending order, add DESC after the last column name in the comma separated list.
Thanks for your quick reply Eliot.. much appreciated !
I can't seem to find any instance of that variable name in Search.pm, search.cgi, DBSQL.pm or DB_Utils.pm which are all the files that help operate the search. Is it my massively hacked code ? could you give me some idea as to where I find those variables in the files ?
I don't mean to be rude, but what's the point of changing that variable ? I can't see, from checking those files for an instance of that variable, that it will have any impact on the indexed search results which are returned. Is this just me being dim ?
No, it's not trivial to change the sort order. You would be better off using search-ni.cgi (the ni stands for non-indexed). From there, you can easily set the sort order.
Thanks Alex ! Is it possible for you to share the principals behind such a modification. If I have some idea about how to go about grouping results it might help a little.
Thanks for that, looks easy enough... although I was sort of hoping for some hints on the indexed search. Are you able to say what the basic principals are behind making it return results in an ordered way but still use the index ?
Thanks for your time Alex, it's very much appreciated.
Sure, it's _very_ ugly, and much improved in 2.0 (total rewrite), but if you are feeling like some pain, it's in Search.pm around line 692:
# ... sort and the data my @query_results = sort { $$b[1] <=> $$a[1] } map ( [$_, $$id_results {$_} ], keys %$id_results );
That sorts it by relevance. You don't have any other information except id's and relevance, but you could play with id_results a little to get it to work.