From 5c03e4aebf50a97d77cc32fec054285a58ab1ff9 Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Wed, 17 Aug 2016 22:41:51 -0400 Subject: [PATCH] Index recently added hashed ip fields --- src/main/java/net/frozenorb/apiv3/APIv3.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/frozenorb/apiv3/APIv3.java b/src/main/java/net/frozenorb/apiv3/APIv3.java index 0918744..3db5f36 100644 --- a/src/main/java/net/frozenorb/apiv3/APIv3.java +++ b/src/main/java/net/frozenorb/apiv3/APIv3.java @@ -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)),