This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/mongo_indexes
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/db/mongo_indexes by this push:
     new 50299480b improve artifact_feed.author_link index by including field 
it is sorted on
50299480b is described below

commit 50299480b070f5dd3ae291172483a1451b7f756d
Author: Dave Brondsema <[email protected]>
AuthorDate: Fri Oct 14 13:15:23 2022 -0400

    improve artifact_feed.author_link index by including field it is sorted on
---
 Allura/allura/model/artifact.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Allura/allura/model/artifact.py b/Allura/allura/model/artifact.py
index 487530f9d..4ec053255 100644
--- a/Allura/allura/model/artifact.py
+++ b/Allura/allura/model/artifact.py
@@ -898,7 +898,8 @@ class Feed(MappedClass):
              ('app_config_id', pymongo.ASCENDING),
              ('pubdate', pymongo.DESCENDING)),
             # used in ext/user_profile/user_main.py for user feeds
-            'author_link',
+            (('author_link', pymongo.ASCENDING),
+             ('pubdate', pymongo.DESCENDING)),
             # used in project feed
             (('project_id', pymongo.ASCENDING),
              ('pubdate', pymongo.DESCENDING)),

Reply via email to