Skip to content

Commit 5768698

Browse files
authored
Merge pull request #227 from clowder-framework/missing-index-comments
missing index
2 parents 4152a29 + f20446d commit 5768698

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## Unreleased
8+
9+
### Fixed
10+
- Added index for comments, will speed up index creation
11+
712
## 1.17.0 - 2021-04-29
813

914
### Fixed

app/services/mongodb/MongoSalatPlugin.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ class MongoSalatPlugin(app: Application) extends Plugin {
118118
collection("collections").ensureIndex(MongoDBObject("author._id" -> 1))
119119
collection("collections").ensureIndex(MongoDBObject("stats" -> 1))
120120

121+
collection("comments").ensureIndex(MongoDBObject("file_id" -> 1))
122+
collection("comments").ensureIndex(MongoDBObject("dataset_id" -> 1))
123+
collection("comments").ensureIndex(MongoDBObject("comment_id" -> 1))
124+
121125
collection("datasets").ensureIndex(MongoDBObject("created" -> -1))
122126
collection("datasets").ensureIndex(MongoDBObject("tags" -> 1))
123127
collection("datasets").ensureIndex(MongoDBObject("files._id" -> 1))

0 commit comments

Comments
 (0)