This file contains hidden or 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
| ..... | |
| //this filters result of the query, then apply aggregations on terms. | |
| //if you want to filter result of the aggregation you will need reducers | |
| //https://github.com/elasticsearch/elasticsearch/issues/8110 | |
| .Aggregations(a1 => a1 | |
| .Filter("filter", fd => fd.Filter(f => | |
| f.Regexp(f3 => f3 | |
| .OnField(d => d.MdFacets) | |
| .Value(parameters.FacetName + @"\|.*")) |
This file contains hidden or 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
| db.Commits.aggregate([ | |
| {$sort: {_id:1}}, | |
| {$unwind : "$Events"}, | |
| {$project : { event : '$Events.Payload.Body._t'}}, | |
| {$group : { | |
| '_id' : '$event', | |
| 'count' : {$sum : 1}} | |
| } | |
| ]) |
NewerOlder