Feature summary
Please implement a configuration variable to set the default method of how search results are sorted: "relevance" (current hardcoded default), "title_asc", "title_desc"
Use case(s)
Within the source, I found the following function:
/**
* Set the type of sort to perform. Must be 'relevance', 'title_asc', 'title_desc'.
* @param string $sort sort type
*/
public function setSort( $sort ) {
$this->sort = $sort;
}And, I see the variable used within the source as well:
/** * @var string sort type */ private $sort = 'relevance';
However, in looking through the extension's configuration variables HERE, I do not see an existing configuration variable for changing the default behavior of the extension.
Benefits
I think the benefits are pretty obvious, and it seems a pretty straightforward feature to implement. The main benefit I see would be to avoid users from needing to manually edit the source files if they do not want the default to be "relevance".
For what it's worth, my users are requesting that the sorting be "by title" because I believe that's what they were used to with the default Mediawiki Search (before I added the CirrusSearch extension.) In other words, I'm making this request because my users want it -- not just for the sake of asking for something new. :)