Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Related observables count #1131

Merged
merged 3 commits into from
Sep 6, 2024
Merged

Related observables count #1131

merged 3 commits into from
Sep 6, 2024

Conversation

udgover
Copy link
Collaborator

@udgover udgover commented Sep 6, 2024

This PR adds the ability to sort entities by related_obsevables_count by:

  • implementing a related_observables_count method as a computed_field in Entity class. This method calls neighbors with observable target type and 1 hop distance in any direction.
  • setting related_observables_count variable in AQL query in ArangoDatabase filter method. This variable executes the same query as related_observables_count Entity method and add the variable to sorting if it's defined.

Test is implemented in tests/schema/graph

@udgover udgover requested a review from tomchop September 6, 2024 13:21
@udgover udgover merged commit 0fd5deb into main Sep 6, 2024
3 checks passed
@udgover udgover deleted the related_observables_count branch September 6, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants