Page MenuHomeSoftware Heritage
Paste P1096

origin types from elasticsearch
ActivePublic

Authored by anlambert on Jul 22 2021, 12:59 PM.
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

ardumont changed the title of this paste from untitled to origin types from elasticsearch.Aug 2 2021, 11:38 AM