Skip to content

Commit

Permalink
Merge pull request #2925 from artsy/joeyAghion/dev
Browse files Browse the repository at this point in the history
Add recommended indices to articles collection (PLATFORM-3169) #migration
  • Loading branch information
jonallured authored Feb 25, 2021
2 parents 2e3a6d9 + 3dab35e commit 7a29f53
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions scripts/db/20210225101205_add_articles_indices.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Run like:
//
// mongo "mongodb+srv://<host>/app29923450" --username positron2 --password <redacted> scripts/db/20210225101205_add_articles_indices.js

db.articles.createIndex(
{
partner_channel_id: 1,
tags: 1,
featured: 1,
published: 1,
published_at: -1
},
{ background: true }
)

db.articles.createIndex(
{
channel_id: 1,
tags: 1,
featured: 1,
published: 1,
published_at: -1
},
{ background: true }
)

0 comments on commit 7a29f53

Please sign in to comment.