Last active
November 18, 2016 01:07
-
-
Save metacpan-user/5521726 to your computer and use it in GitHub Desktop.
Aggregate by License
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": { | |
"range": { | |
"date": { | |
"gt": "2010-06-05T00:00:00", | |
"lt": "2011-06-05T00:00:00" | |
} | |
} | |
}, | |
"aggs": { | |
"license": { | |
"terms": { | |
"field": "license", | |
"size": 10 | |
} | |
} | |
}, | |
"size": 0 | |
} |
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
/v1/release |
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
{ | |
"timed_out" : false, | |
"hits" : { | |
"hits" : [], | |
"max_score" : 1, | |
"total" : 22489 | |
}, | |
"_shards" : { | |
"failed" : 0, | |
"successful" : 5, | |
"total" : 5 | |
}, | |
"took" : 150, | |
"facets" : { | |
"license" : { | |
"other" : 106, | |
"terms" : [ | |
{ | |
"count" : 14886, | |
"term" : "perl_5" | |
}, | |
{ | |
"count" : 4705, | |
"term" : "unknown" | |
}, | |
{ | |
"count" : 1134, | |
"term" : "open_source" | |
}, | |
{ | |
"count" : 695, | |
"term" : "artistic_2" | |
}, | |
{ | |
"count" : 303, | |
"term" : "mit" | |
}, | |
{ | |
"count" : 230, | |
"term" : "artistic_1" | |
}, | |
{ | |
"count" : 197, | |
"term" : "bsd" | |
}, | |
{ | |
"count" : 94, | |
"term" : "apache_2_0" | |
}, | |
{ | |
"count" : 78, | |
"term" : "freebsd" | |
}, | |
{ | |
"count" : 61, | |
"term" : "unrestricted" | |
} | |
], | |
"missing" : 0, | |
"_type" : "terms", | |
"total" : 22489 | |
} | |
} | |
} |
reyjrar
commented
Nov 18, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment