mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
Add indexes for front page properties
This commit is contained in:
parent
f055d910c7
commit
b87e303ba9
|
@ -110,6 +110,24 @@ await _buildCollection.Indexes.CreateOneAsync(Builders<Build>.IndexKeys.Ascendin
|
|||
Name = "_idx_alt_bstr"
|
||||
});
|
||||
}
|
||||
|
||||
if (indexes.All(i => i["name"] != "_idx_source"))
|
||||
{
|
||||
await _buildCollection.Indexes.CreateOneAsync(Builders<Build>.IndexKeys.Ascending(b => b.SourceType),
|
||||
new CreateIndexOptions
|
||||
{
|
||||
Name = "_idx_source"
|
||||
});
|
||||
}
|
||||
|
||||
if (indexes.All(i => i["name"] != "_idx_family"))
|
||||
{
|
||||
await _buildCollection.Indexes.CreateOneAsync(Builders<Build>.IndexKeys.Ascending(b => b.Family),
|
||||
new CreateIndexOptions
|
||||
{
|
||||
Name = "_idx_family"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[DataObjectMethod(DataObjectMethodType.Select, true)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user