use better index type (#651)

This commit is contained in:
Jesse Plamondon-Willard 2019-07-07 00:55:10 -04:00
parent 2b3f0e740b
commit a731f5ea9a
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
2 changed files with 2 additions and 3 deletions

View File

@ -127,5 +127,4 @@ Initial setup:
To deploy updates: To deploy updates:
1. Deploy the web project using [AWS Toolkit for Visual Studio](https://aws.amazon.com/visualstudio/). 1. Deploy the web project using [AWS Toolkit for Visual Studio](https://aws.amazon.com/visualstudio/).
2. If the MongoDB schema changed, delete the collections in the MongoDB database. (They'll be 2. If the MongoDB schema changed, delete the MongoDB database. (It'll be recreated automatically.)
recreated automatically.)

View File

@ -32,7 +32,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Wiki
this.WikiMods = database.GetCollection<CachedWikiMod>("wiki-mods"); this.WikiMods = database.GetCollection<CachedWikiMod>("wiki-mods");
// add indexes if needed // add indexes if needed
this.WikiMods.Indexes.CreateOne(new CreateIndexModel<CachedWikiMod>(Builders<CachedWikiMod>.IndexKeys.Text(p => p.ID))); this.WikiMods.Indexes.CreateOne(new CreateIndexModel<CachedWikiMod>(Builders<CachedWikiMod>.IndexKeys.Ascending(p => p.ID)));
} }
/// <summary>Get the cached wiki metadata.</summary> /// <summary>Get the cached wiki metadata.</summary>