Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P1096
origin types from elasticsearch
Active
Public
Actions
Authored by
anlambert
on Jul 22 2021, 12:59 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
anlambert@carnavalet:~/tmp$ cat es_query.sh
#!/bin/bash
curl -X POST http://localhost:9200/origin-production/_search?pretty -H 'Content-Type: application/json' -d '
{
"aggs" : {
"vist_types" : {
"terms" : { "field" : "visit_types", "size":10000 }
}
},
"size" : 0
}'
anlambert@carnavalet:~/tmp$ time ./es_query.sh
{
"took" : 429,
"timed_out" : false,
"_shards" : {
"total" : 90,
"successful" : 90,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 10000,
"relation" : "gte"
},
"max_score" : null,
"hits" : [ ]
},
"aggregations" : {
"vist_types" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"key" : "git",
"doc_count" : 151794432
},
{
"key" : "npm",
"doc_count" : 1660597
},
{
"key" : "svn",
"doc_count" : 678797
},
{
"key" : "hg",
"doc_count" : 381103
},
{
"key" : "pypi",
"doc_count" : 326793
},
{
"key" : "deb",
"doc_count" : 72303
},
{
"key" : "cran",
"doc_count" : 18019
},
{
"key" : "ftp",
"doc_count" : 1205
},
{
"key" : "deposit",
"doc_count" : 1079
},
{
"key" : "tar",
"doc_count" : 389
},
{
"key" : "nixguix",
"doc_count" : 2
}
]
}
}
}
real 0m0,553s
user 0m0,013s
sys 0m0,014s
Event Timeline
anlambert
created this paste.
Jul 22 2021, 12:59 PM
2021-07-22 12:59:30 (UTC+2)
ardumont
changed the title of this paste from untitled to
origin types from elasticsearch
.
Aug 2 2021, 11:38 AM
2021-08-02 11:38:42 (UTC+2)
Log In to Comment