Skip to content

Instantly share code, notes, and snippets.

View abdonpijpelink's full-sized avatar

Abdon Pijpelink abdonpijpelink

  • Elastic
  • Amsterdam
View GitHub Profile
# Employees sample data
PUT _index_template/employees_template
{
"index_patterns": [
"employees*"
],
"template": {
"mappings": {
"properties": {
[
{
"_id": "eb943000-d436-11e8-b8de-37bd196be3fc",
"_type": "visualization",
"_source": {
"title": "[Sysmon] Process Images",
"visState": "{\"title\":\"[Sysmon] Process Images\",\"type\":\"horizontal_bar\",\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":200},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":75,\"filter\":true,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"normal\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesB
@abdonpijpelink
abdonpijpelink / gist:03fc062904d0120b1aa9837f6d668374
Created August 9, 2018 11:19
Going from documents in separate indexes to a single parent-child index.
#
# Going from documents in separate indexes to a single
# parent-child index.
#
# Index a company document into the companies index
PUT companies/_doc/1
{
"company_name": "Stark Enterprises"
}