We have a search button on our website that does a sitewide search, and I was wondering how you get about making it so that the search results display in date order (most recent items first). At the moment it seems to display things at random, with items as old as 2005 being listed first. Can anyone help please?
At this stage we do not have a sort by parameter for the search module.
The additional parameters that are available can be found below.
Can you tell us what the default parameters are for the search? That is, what does the search engine use to decide the display order of the results page. Is it by date, weighting or number of times the query term appears on page? Our search is currently showing items from 2005 before our latest items. We would like to correct this and can manually update the weightings (a big job) - if this will improve the order of our search results.
I'll share my newly found work around.
I use this. I put a huge number in the resultsPerPage argument and then process the results with a JS sorting plugin like this: http://datatables.net/index
That plugin it particular is better than the built in functionality as it has better pagination and can sort columns if you display it in a table.
I have to warn you, this is not something someone can do with out good working knowledge of HTML & JS/Jquery.
I would also like to know the process behind ordering the search results as asked in comment #3.
Also, how it searches for search terms in text... say I search on "Pumpkin", will it also return results for "Pumpkins" seeing as it contains the initial query?