Index recently added hashed ip fields

This commit is contained in:
Colin McDonald 2016-08-17 22:41:51 -04:00
parent 6473ee2bd1
commit 5c03e4aebf
1 changed files with 6 additions and 1 deletions

View File

@ -211,13 +211,18 @@ public final class APIv3 extends AbstractVerticle {
});
database.getCollection("ipLog").createIndexes(ImmutableList.of(
new IndexModel(new Document("user", 1)),
new IndexModel(new Document("user", 1).append("userIp", 1))
new IndexModel(new Document("user", 1).append("userIp", 1)),
new IndexModel(new Document("hashedUserIp", 1))
), (a, b) -> {
});
database.getCollection("ipBans").createIndexes(ImmutableList.of(
new IndexModel(new Document("userIp", 1))
), (a, b) -> {
});
database.getCollection("ipIntel").createIndexes(ImmutableList.of(
new IndexModel(new Document("hashedIp", 1))
), (a, b) -> {
});
database.getCollection("punishments").createIndexes(ImmutableList.of(
new IndexModel(new Document("user", 1)),
new IndexModel(new Document("type", 1)),