Browse Source

IMprove MongoDB query performance.

pull/65/merge
Sebastian Stehle 9 years ago
parent
commit
d4b03f8224
  1. 1
      src/Squidex.Domain.Apps.Read.MongoDb/Contents/MongoContentRepository_EventHandling.cs

1
src/Squidex.Domain.Apps.Read.MongoDb/Contents/MongoContentRepository_EventHandling.cs

@ -62,6 +62,7 @@ namespace Squidex.Domain.Apps.Read.MongoDb.Contents
{
return ForAppIdAsync(@event.AppId.Id, async collection =>
{
await collection.Indexes.CreateOneAsync(Index.Ascending(x => x.SchemaId).Descending(x => x.LastModified));
await collection.Indexes.CreateOneAsync(Index.Ascending(x => x.ReferencedIds));
await collection.Indexes.CreateOneAsync(Index.Ascending(x => x.IsPublished));
await collection.Indexes.CreateOneAsync(Index.Text(x => x.DataText));

Loading…
Cancel
Save