Dang … quick.
-bash-4.2$ time curl -u Administrator:********* -XPOST -H “Content-Type: application/json” http://localhost:8094/api/index/faksearch2/query -d ’
{
“query”: {
“match_all”: {}
},
“facets”: {
“type_tokens”: {
“field”: “type”,
“size”: 10
}
}
}
real 0m0.430s
user 0m0.002s
sys 0m0.004s
…
…
“total_hits”: 2084816,
“max_score”: 1,
“took”: 422837925,
“facets”: {
“type_tokens”: {
“field”: “type”,
“total”: 1296666,
“missing”: 788150,
“other”: 9,
“terms”: [
{
“term”: “products”,
“count”: 617019
},
{
“term”: “phone”,
“count”: 309668
},
{
“term”: “customer”,
“count”: 143777
},
{
“term”: “addressbooklist”,
“count”: 48893
},
{
“term”: “email”,
“count”: 45561
},
{
“term”: “addressbooklookup”,
“count”: 42036
},
{
“term”: “addressbook”,
“count”: 41891
},
{
“term”: “custguid”,
“count”: 20587
},
{
“term”: “cn”,
“count”: 15694
},
{
“term”: “customerstatus”,
“count”: 11531
}
Only thing is the counts dont match. Products above returns 617019
whereas
select * from (select type
, count(1) from ice_us
where type is not missing group by type order by 2 desc ) d limit 10
returns
{
“d”: {
“$1”: 4056453,
“type”: “PRODUCTS”
}
},
{
“d”: {
“$1”: 892754,
“type”: “addressbook”
}
},
{
“d”: {
“$1”: 740859,
“type”: “addressbooklist”
}
},
{
“d”: {
“$1”: 894095,
“type”: “addressbooklookup”
}
},
{
“d”: {
“$1”: 3196,
“type”: “agentldap”
}
},
{
“d”: {
“$1”: 15,
“type”: “avtaddrbkrel”
}
},
{
“d”: {
“$1”: 2,
“type”: “avtcountry”
}
},
{
“d”: {
“$1”: 4,
“type”: “avtcustaddrbk”
}
},
{
“d”: {
“$1”: 1,
“type”: “avtcustnicknamedisp”
}
},
{
“d”: {
“$1”: 24,
“type”: “avtcustomerstatus”
}
}
]