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

kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 59b3f5de9b17d5e021bd9d2599e9dc740f0421ff
Author: Dave Brondsema <[email protected]>
AuthorDate: Mon Oct 25 11:42:29 2021 -0400

    Add post/forum_post index.  NEEDS INSURE INDEX
---
 Allura/allura/model/discuss.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index fd1b423..83c1531 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -517,7 +517,9 @@ class Post(Message, VersionedArtifact, ActivityObject, 
ReactableArtifact):
         indexes = [
             # used in general lookups, last_post, etc
             ('discussion_id', 'status', 'timestamp'),
-            'thread_id'
+            'thread_id',
+            # for find_posts/query_posts, including full_slug sort which is 
useful on super big threads
+            ('deleted', 'discussion_id', 'thread_id', 'full_slug'),
         ]
 
     query: 'Query[Post]'

Reply via email to