diff --git a/src/Document/Post.php b/src/Document/Post.php index b67fbce1c..f181bedb4 100644 --- a/src/Document/Post.php +++ b/src/Document/Post.php @@ -26,6 +26,7 @@ */ #[ODM\Document(repositoryClass: PostRepository::class)] #[ODM\UniqueIndex(keys: ['slug' => 1], options: ['unique' => true])] +#[ODM\Index(['order' => 'desc', 'tags.name' => 'asc'])] #[Unique(fields: ['slug'], message: 'post.slug_unique', errorPath: 'title')] class Post {