| @@ -221,6 +221,7 @@ const ( | |||||
| SearchOrderByHot SearchOrderBy = "(num_watches + num_stars + num_forks + clone_cnt) DESC" | SearchOrderByHot SearchOrderBy = "(num_watches + num_stars + num_forks + clone_cnt) DESC" | ||||
| SearchOrderByActive SearchOrderBy = "(num_issues + num_pulls + num_commit) DESC" | SearchOrderByActive SearchOrderBy = "(num_issues + num_pulls + num_commit) DESC" | ||||
| SearchOrderByWatches SearchOrderBy = "num_watches DESC" | SearchOrderByWatches SearchOrderBy = "num_watches DESC" | ||||
| SearchOrderByDefault SearchOrderBy = "recommend desc,num_stars DESC,updated_unix DESC" | |||||
| ) | ) | ||||
| // SearchRepositoryCondition creates a query condition according search repository options | // SearchRepositoryCondition creates a query condition according search repository options | ||||
| @@ -309,9 +309,11 @@ func ExploreDatasets(ctx *context.Context) { | |||||
| orderBy = models.SearchOrderByStarsReverse | orderBy = models.SearchOrderByStarsReverse | ||||
| case "feweststars": | case "feweststars": | ||||
| orderBy = models.SearchOrderByStars | orderBy = models.SearchOrderByStars | ||||
| case "default": | |||||
| orderBy = models.SearchOrderByDefault | |||||
| default: | default: | ||||
| ctx.Data["SortType"] = "recentupdate" | |||||
| orderBy = models.SearchOrderByRecentUpdated | |||||
| ctx.Data["SortType"] = "default" | |||||
| orderBy = models.SearchOrderByDefault | |||||
| } | } | ||||
| keyword := strings.Trim(ctx.Query("q"), " ") | keyword := strings.Trim(ctx.Query("q"), " ") | ||||