Sorting search results
Search results can be sorted in 6 ways:
- By relevance; the relevance is generally proportional to the number of keywords found in the web pages
- By reverse relevance (least accurate documents first)
- By last modified time, with newest documents first
- By last modified time, with oldest documents first
- By last indexed time, with most-recently-indexed document first
- By reverse last indexed time
Sorting method 1 is by far the most useful.
To control which default sorting method is used, go to "Admin Page" => "User Interface" => "Sorting: Default Sort Method". You may set this to one of the six values above.
To allow your visitors to select the sorting method at runtime, use the "sort-method" HTML FORM variable. For example, add the following code to your search form:
<p>Sort results by: <select name="sort-method"> <option value="1"> Relevance <option value="3"> Last modified time <option value="5"> Time web page last indexed </select>.</p>
Note that the "last modified" value is generally unknown for pages retrieved over the web. When it is unknown, the search engine will use the last indexed time as the last modified time. Thus, when sorting by last modified time on a realm which contains pages retrieved over the web, most of the results will be clustered at the top around the time that the search index was last rebuilt; any web pages which did return true last modified times will appear at the very end of the results list. Thus, exposing this option is only advised when searching indexes where all the web pages were retreived directly from the file system, and for which the true last modified time is always known.
See also: Calculating last-modified time
History: support for the "sort-method" parameter was added in FDSE version 2.0.0.0042. Prior to this version, all searches used relevance ranking.
Sorting of the time fields, last modified and last indexed, requires that the index files contain time information. All index files build with FDSE version 2.0.0.0031 or newer contain that information. If you have older index files, you must completely rebuild them using a newer version of FDSE in order for the time sorting to work.
"Sorting search results" https://www.xav.com/scripts/search/help/1073.html