When searching a database using the simple search form, the default search functionality with the "sort-by" parameter seems to be broken.
When the "sort-by" parameter is set to one of the "Other" values, eg. "Time added", the search functions as expected. Ie., The search term is used to query the database over all fields and then the results are sorted by "time added". However, if the "sort-by" parameter is set to one of the "Fields", the search query breaks down. Only the "sort-by" field is queried for the search term and the results are then sorted by the "sort-by" field.
In the example below, you would expect that searching for "Swedish" and sorting by recipe type would display all recipes matching "Swedish", including "Swedish delight", and sorting the results by type ("vegetarian", "meat", etc.). However, because "Swedish" isn't a type, no results are returned.
Demo : http://school.demo.moodle.net/mod/data/view.php?d=21
Is there a way to change this search behaviour to a more intuitive one?