Ticket #1250 (closed enhancement: fixed)
Search results should be sorted by score rather than alphabetical
Reported by: | rgrp | Owned by: | pudo |
---|---|---|---|
Priority: | major | Milestone: | ckan-v1.5 |
Component: | ckan | Keywords: | |
Cc: | Repository: | ckan | |
Theme: | none |
Description
At the moment we sort search results alphabetically. While this is useful for doing 'browse' case where no search bad for all other cases.
Adopt default sort order of 'score' though may wish to keep alphabetical for no search term (i.e. wildcard).
Options:
- Default this in solr (no need to touch code) but fragile and affects everything ...
- Do it in code and default to score
- Do it in code and have alphabetical (on name or title?) when no criteria otherwise score
Aside: may also wish to support search in query api but that is for later!
Change History
Note: See
TracTickets for help on using
tickets.
The issue is caused after search returns from solr and tries to get objects from the database. These are by default ordered by name and we need to restore the original order after fetching them from the database.
Fixed in module.