Skip to content

Instantly share code, notes, and snippets.

@BrianHicks
Last active December 27, 2015 14:39
Show Gist options
  • Save BrianHicks/7342186 to your computer and use it in GitHub Desktop.
Save BrianHicks/7342186 to your computer and use it in GitHub Desktop.
POST analytics-2013.11.06/_search
{
"query": {"match_all": {}},
"facets": {
"tags": {
"terms": {
"field": "params.tag",
"size": 10
}
}
},
"size": 0
}
{
"template": "analytics*",
"settings": {
"number_of_shards": 2,
"number_of_replicas": 2
},
"mappings": {
"analytics" : {
"_routing": {
"require": true,
"path": "params.guid"
},
"_timestamp": {
"enabled": true,
"path": "@timestamp"
},
"properties" : {
"@timestamp" : {
"type" : "date",
"format" : "dateOptionalTime"
},
"@version" : {
"type" : "long"
},
"agent" : {
"properties" : {
"build" : {
"type" : "string",
"analyzer": "keyword"
},
"device" : {
"type" : "string",
"analyzer": "keyword"
},
"major" : {
"type" : "string",
"analyzer": "keyword"
},
"minor" : {
"type" : "string",
"analyzer": "keyword"
},
"name" : {
"type": "multi_field",
"fields": {
"name": {"type": "string", "analyzer": "keyword"},
"parts": {"type": "string", "index": "analyzed"}
}
},
"os" : {
"type" : "string",
"analyzer": "keyword"
},
"patch" : {
"type" : "string",
"analyzer": "keyword"
}
}
},
"auth" : {
"type" : "string",
"analyzer": "keyword"
},
"bytes" : {
"type" : "long"
},
"client" : {
"type" : "ip"
},
"host" : {
"type" : "string",
"analyzer": "keyword"
},
"ident" : {
"type" : "string",
"analyzer": "keyword"
},
"message" : {
"type" : "string",
"analyzer": "keyword"
},
"params" : {
"properties" : {
"_method" : {
"type" : "string",
"analyzer": "keyword"
},
"aff" : {
"type" : "string",
"analyzer": "keyword"
},
"guid" : {
"type" : "string",
"analyzer": "keyword"
},
"medium" : {
"type" : "string",
"analyzer": "keyword"
},
"ref" : {
"type" : "string",
"analyzer": "keyword"
},
"source" : {
"type" : "string",
"analyzer": "keyword"
},
"tag" : {
"type" : "string",
"analyzer": "keyword"
}
}
},
"path" : {
"type" : "string",
"analyzer": "keyword"
},
"referrer" : {
"type" : "string",
"analyzer": "keyword"
},
"request" : {
"type" : "string",
"analyzer": "keyword"
},
"response" : {
"type" : "long"
},
"timestamp" : {
"type" : "string",
"analyzer": "keyword"
},
"type" : {
"type" : "string",
"analyzer": "keyword"
},
"verb" : {
"type" : "string",
"analyzer": "keyword"
},
"version" : {
"type" : "double"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment