From d77f20b14e6433309c5abe82777c5fdc7c905ad2 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Fri, 28 Apr 2017 12:29:25 -0700 Subject: [PATCH] [DOCS] Update ML tutorial with latest sample data (elastic/x-pack-elasticsearch#1258) * [DOCS] Updated mappings in ML sample data * [DOCS] Update ML tutorial with latest sample data Original commit: elastic/x-pack-elasticsearch@37fd75aed50ff7025855867ef3101964d4c3c059 --- docs/en/ml/getting-started.asciidoc | 88 ++++++++++++----------------- 1 file changed, 37 insertions(+), 51 deletions(-) diff --git a/docs/en/ml/getting-started.asciidoc b/docs/en/ml/getting-started.asciidoc index 97530dc85f5..70e09c99209 100644 --- a/docs/en/ml/getting-started.asciidoc +++ b/docs/en/ml/getting-started.asciidoc @@ -143,23 +143,22 @@ Each document in the server-metrics data set has the following schema: [source,js] ---------------------------------- - { "index": { "_index":"server-metrics", "_type":"metric", - "_id":"AVuQL1eekrHQ5a9V5qre" + "_id":"1177" } } { - "deny":1783, - "service":"app_0", - "@timestamp":"2017-03-26T06:47:28.684926", - "accept":24465, - "host":"server_1", - "total":26248, - "response":1.8242486553275024 + "@timestamp":"2017-03-23T13:00:00", + "accept":36320, + "deny":4156, + "host":"server_2", + "response":2.4558210155, + "service":"app_3", + "total":40476 } ---------------------------------- @@ -195,50 +194,37 @@ mapping for the data set: curl -u elastic:changeme -X PUT -H 'Content-Type: application/json' http://localhost:9200/server-metrics -d '{ - "settings": { - "number_of_shards": 1, - "number_of_replicas": 0 - }, - "mappings": { - "metric": { - "properties": { - "@timestamp": { - "type": "date" - }, - "accept": { - "type": "long" - }, - "deny": { - "type": "long" - }, - "host": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } + "settings":{ + "number_of_shards":1, + "number_of_replicas":0 + }, + "mappings":{ + "metric":{ + "properties":{ + "@timestamp":{ + "type":"date" + }, + "accept":{ + "type":"long" + }, + "deny":{ + "type":"long" + }, + "host":{ + "type":"keyword" + }, + "response":{ + "type":"float" + }, + "service":{ + "type":"keyword" + }, + "total":{ + "type":"long" } - }, - "response": { - "type": "float" - }, - "service": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "total": { - "type": "long" - } - } + } } - } - } + } }' ----------------------------------