Skip to content

Commit 7a29f53

Browse files
authored
Merge pull request #2925 from artsy/joeyAghion/dev
Add recommended indices to articles collection (PLATFORM-3169) #migration
2 parents 2e3a6d9 + 3dab35e commit 7a29f53

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Run like:
2+
//
3+
// mongo "mongodb+srv://<host>/app29923450" --username positron2 --password <redacted> scripts/db/20210225101205_add_articles_indices.js
4+
5+
db.articles.createIndex(
6+
{
7+
partner_channel_id: 1,
8+
tags: 1,
9+
featured: 1,
10+
published: 1,
11+
published_at: -1
12+
},
13+
{ background: true }
14+
)
15+
16+
db.articles.createIndex(
17+
{
18+
channel_id: 1,
19+
tags: 1,
20+
featured: 1,
21+
published: 1,
22+
published_at: -1
23+
},
24+
{ background: true }
25+
)

0 commit comments

Comments
 (0)