Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "admin": {
- "ids": {
- "batchId": "xxx"
- },
- "orgId": "yyy"
- },
- "objectId": "abc"
- },
- {
- "admin": {
- "ids": {
- "batchId": "xxy"
- },
- "orgId": "yyy"
- },
- "objectId": "abcd"
- }
- ]
- {
- "org" : "yyy",
- groupBatches : [
- {
- "batchID" : "xxx"
- },
- {
- "batchID" : "xxy"
- }
- ]
- }
- {
- "_source": [ "objectId", "admin.orgId", "admin.ids.batchId"],
- "query" : {
- "nested": {
- "path": "admin",
- "query": {
- "match": {"admin.orgId": "xxx"}
- }
- }
- },
- "aggs" : {
- "groupBatches" : {
- "nested": {
- "path": "admin"
- },
- "aggs" : {
- "batches" : {
- "terms" : {"field" : "admin.ids.batchId"}
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment