Skip to content

Commit

Permalink
#1964 Renew global index only if ElasticSearch is used
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Apr 15, 2021
1 parent e1e5c89 commit b9cd5be
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,12 @@ class TheHiveSchemaDefinition @Inject() extends Schema with UpdatableSchema {
.removeIndex("Tag", IndexType.standard)
.removeIndex("Task", IndexType.standard)
//=====[release 4.1.3]=====
.removeIndex("global", IndexType.fulltext)
.dbOperation[JanusDatabase]("Remove global index if ElasticSearch is used") { db =>
db.managementTransaction(mgmt => Try(mgmt.get("index.search.backend"))).flatMap {
case "elasticsearch" => db.removeIndex("global", IndexType.fulltext, Nil)
case _ => Success(())
}
}
.updateGraph("Add manageProcedure permission to org-admin and analyst profiles", "Profile") { traversal =>
traversal
.unsafeHas("name", P.within("org-admin", "analyst"))
Expand Down

0 comments on commit b9cd5be

Please sign in to comment.