Search Results Order
Hi Low
I'd like to be able to display my Low Search results in the following ways:
* By newest first
* By oldest first
* Alphabetically by value of custom field
Can I do this with Low Search?
Cheers
Jim
Replies
Low 27 Jun 2012 07:52
Hi Jim,
By default, search results are sorted by relevance, but you can override that by setting the orderby="" parameter to anything else. Use anything you would with a regular channel:entries tag.
Jim P 27 Jun 2012 08:02
Ooh, that's lovely news - thanks!
Jim Riley 18 Jul 2012 15:58
Is it possible to give users an option to re-order the search results output.
E.g. the initial search results output could be in descending search score
but an option (is also provided to reorder by latest first...
Jim
Low 18 Jul 2012 16:23
Hi Jim,
You can use another search form, prefill it using the query="" parameter, and only use the orderby="" and sort="" parameters/fields as usable input fields. I'll explain further in the other thread you've started, 'cause that's related.
Hendrik-Jan Francke 7 Mar 2013 16:28
Does the order_by="" parameter completely overrule relevance? Once I added the parameter the results are reordered, but not perfectly. I set it to order by grant year, descending. Yet I get the years out of order.
Low 7 Mar 2013 16:29
You should use orderby="" not order_by="".
Hendrik-Jan Francke 7 Mar 2013 17:15
My mistake! When I split out the ":orderby_sort" into orderby and sort (as I saw somewhere as a suggestion) I kept the underscore. should have know better.
Thank you for the quick reply.