Created
July 14, 2022 16:26
-
-
Save marcusmotill/92629ba5adb0dc42abf764c4b5a3d85a to your computer and use it in GitHub Desktop.
Query for seeing how many activity defs exist on a team for a given sourceContent type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"has_parent": { | |
"parent_type": "globalDefinition", | |
"score": true, | |
"query": { | |
"term": { | |
"activity.sourceContentType": "account" | |
} | |
} | |
} | |
} | |
] | |
} | |
}, | |
"aggs":{ | |
"teams": { | |
"terms":{ | |
"field": "teamId" | |
} | |
} | |
}, | |
"size": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment