Display Search Results with most recent posts first?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Display Search Results with most recent posts first?

Coleen_Astalos
Is there a way to change the default sort that is shown after an initial sort to be "Sort by Date" instead of "Sort by Relevance"?  

The "Sort by Relevance" doesn't seem to really work very well.  For example, if I search for "Accountability", the top relevant item it finds is something with "Account" whereas there are other posts that have the actual word "Accountability" in them that are lower down the Relevance list.

Thanks,
Coleen
Reply | Threaded
Open this post in threaded view
|

Re: Display Search Results with most recent posts first?

Pedro
Please, *test it for me:
<override_macro name="search_form" dot_parameter="do" parameters="style,query,author,starrer,days,sort" requires="node">
    <form style="[n.style/]" action="/template/NamlServlet.jtp">
        <input type="hidden" name="macro" value="search_page" />
        <input type="hidden" name="node" value="[n.id/]" />
        <n.hidden_field name="query" value="[n.query/]" />
        <n.hidden_field name="author" value="[n.author/]" />
        <n.hidden_field name="starrer" value="[n.starrer/]" />
        <n.hidden_field name="days" value="[n.days/]" />
        <n.hidden_field name="sort" value="date" />
        <n.do/>
    </form>
</override_macro>
*I don't have a test forum where it contains a number of posts that could 100% test this edit. But I test it in a small forum, it seems to be working.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Display Search Results with most recent posts first?

Coleen_Astalos
Thanks.  That seems to work great.
Coleen