Hello.  I'm trying to make a 2D contingency table in Kibana (eg domain by 
_type).  The below in Chrome/Sense returns reasonable results, but how do I 
get this displayed in kibana?  I'm trying to use a table panel but can't 
figure out where to put the query - maybe a different panel or future 
aggregations panel is needed?  Thanks.

-Jon Stearley


HERE IS THE QUERY:

GET /_all/_search
{
  "aggregations": {
    "domains": {
      "terms": {
        "field": "DOMAIN"
      },
      "aggregations": {
          "bytype": {
              "terms":{
                  "field":"_type"
              }
          }
      }
    }
  },
  "size": 0
}





HERE IS AN EXAMPLE RESULT (actual domains and types anonymized):



{
   "took": 252,
   "timed_out": false,
   "_shards": {
      "total": 6,
      "successful": 6,
      "failed": 0
   },
   "hits": {
      "total": 967233,
      "max_score": 0,
      "hits": []
   },
   "aggregations": {
      "domains": {
         "buckets": [
            {
               "key": "bleh.blech",
               "doc_count": 3508,
               "bytype": {
                  "buckets": [
                     {
                        "key": "type",
                        "doc_count": 3506
                     },
                     {
                        "key": "typeb",
                        "doc_count": 2
                     }
                  ]
               }
            },
            {
               "key": "foo.gah",
               "doc_count": 3470,
               "bytype": {
                  "buckets": [
                     {
                        "key": "typea",
                        "doc_count": 3400
                     },
                     {
                        "key": "typeb",
                        "doc_count": 70
                     }
                  ]
               }
            }
         ]
      }
   }
}

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/565187bd-5abe-433b-be07-44cd107bd607%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to