Skip to content

Commit

Permalink
#1946 Use index to count alert observable
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Apr 12, 2021
1 parent 29d6564 commit 4bdac38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thehive/app/org/thp/thehive/services/AlertSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,11 @@ object AlertOps {
.by(_.richCustomFields.fold)
.by(_.`case`._id.option)
.by(_.caseTemplate.value(_.name).option)
.by(_.observables.count)
.by(entityRenderer)
)
.domainMap {
case (alert, customFields, caseId, caseTemplate, observableCount, renderedEntity) =>
case (alert, customFields, caseId, caseTemplate, renderedEntity) =>
val observableCount = traversal.graph.indexCountQuery(s"""v."_label":Observable AND v.relatedId:${alert._id.value}""")
RichAlert(
alert,
customFields,
Expand Down

0 comments on commit 4bdac38

Please sign in to comment.