From 6d88194b755f63bfde7097bb43f13cde17a8dfc4 Mon Sep 17 00:00:00 2001 From: To-om Date: Sun, 11 Apr 2021 09:43:12 +0200 Subject: [PATCH] #1946 Remove all obsolete index --- .../thp/thehive/models/TheHiveSchemaDefinition.scala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/thehive/app/org/thp/thehive/models/TheHiveSchemaDefinition.scala b/thehive/app/org/thp/thehive/models/TheHiveSchemaDefinition.scala index ce482c23a6..0763d4397e 100644 --- a/thehive/app/org/thp/thehive/models/TheHiveSchemaDefinition.scala +++ b/thehive/app/org/thp/thehive/models/TheHiveSchemaDefinition.scala @@ -449,7 +449,6 @@ class TheHiveSchemaDefinition @Inject() extends Schema with UpdatableSchema { .removeIndex("Case", IndexType.basic, "status") .removeIndex("Task", IndexType.basic, "status") .removeIndex("Alert", IndexType.basic, "type", "source", "sourceRef") - //=====[release 4.1.3]===== .updateGraph("Set caseId in imported alerts", "Alert") { traversal => traversal .project( @@ -462,6 +461,15 @@ class TheHiveSchemaDefinition @Inject() extends Schema with UpdatableSchema { } Success(()) } + .removeIndex("Alert", IndexType.standard) + .removeIndex("Attachment", IndexType.standard) + .removeIndex("Audit", IndexType.standard) + .removeIndex("Case", IndexType.standard) + .removeIndex("Log", IndexType.standard) + .removeIndex("Observable", IndexType.standard) + .removeIndex("Tag", IndexType.standard) + .removeIndex("Task", IndexType.standard) + //=====[release 4.1.3]===== val reflectionClasses = new Reflections( new ConfigurationBuilder()