seed and use comment count for sorting
This commit is contained in:
parent
87f695484b
commit
cadfc7b9bd
|
|
@ -32,7 +32,8 @@ class SearchController extends ListDiscussionsController
|
|||
|
||||
protected array $translateSort = [
|
||||
'lastPostedAt' => 'updated_at',
|
||||
'createdAt' => 'created_at'
|
||||
'createdAt' => 'created_at',
|
||||
'commentCount' => 'comment_count'
|
||||
];
|
||||
|
||||
public function __construct(protected Client $elastic)
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@ class CommentSeeder extends Seeder
|
|||
'updated_at' => $model->edited_at?->toAtomString(),
|
||||
'is_private' => $model->is_private,
|
||||
'user_id' => $model->user_id,
|
||||
'groups' => $this->groupsForDiscussion($model->discussion)
|
||||
'groups' => $this->groupsForDiscussion($model->discussion),
|
||||
'comment_count' => $model->discussion->comment_count,
|
||||
]);
|
||||
|
||||
if ($this->extensionEnabled('fof-byobu')) {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@ class DiscussionSeeder extends Seeder
|
|||
'updated_at' => $model->last_posted_at?->toAtomString(),
|
||||
'is_private' => $model->is_private,
|
||||
'user_id' => $model->user_id,
|
||||
'groups' => $this->groupsForDiscussion($model)
|
||||
'groups' => $this->groupsForDiscussion($model),
|
||||
'comment_count' => $model->comment_count,
|
||||
]);
|
||||
|
||||
if ($this->extensionEnabled('fof-byobu')) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue