From 1829fc75dc4de3ffe03283942aa736c81f526ea1 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 27 Nov 2014 23:55:41 +0100 Subject: terms aggregation for nested data works now --- src/es5/es-query.json | 2 +- src/es5/sfive-init.json | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) (limited to 'src/es5') diff --git a/src/es5/es-query.json b/src/es5/es-query.json index 1be731d..5bec12f 100644 --- a/src/es5/es-query.json +++ b/src/es5/es-query.json @@ -3,7 +3,7 @@ { "by_hostname": { - "terms": { "script": "doc['source-id'].values.join('/')" } + "terms": { "script": "[ doc['hostname'].value, doc['streamer-id.content-id'].value, doc['streamer-id.format'].value, doc['streamer-id.quality'].value ].join('/') " } }, "the_total_time": { diff --git a/src/es5/sfive-init.json b/src/es5/sfive-init.json index 4ebfd92..3dd33d7 100644 --- a/src/es5/sfive-init.json +++ b/src/es5/sfive-init.json @@ -4,11 +4,6 @@ "mappings" : { "dataupdate" : { "properties" : { - "source-id": { - "type": "string", - "index" : "not_analyzed", - "store": true - }, "SourceHubDataUpdateId" : { "type" : "long" }, @@ -34,8 +29,7 @@ }, "hostname" : { "type" : "string", - "index" : "not_analyzed", - "copy_to": "source-id" + "index" : "not_analyzed" }, "start-time" : { "type" : "date", @@ -45,18 +39,15 @@ "properties" : { "content-id" : { "type" : "string", - "index" : "not_analyzed", - "copy_to": "source-id" + "index" : "not_analyzed" }, "format" : { "type" : "string", - "index" : "not_analyzed", - "copy_to": "source-id" + "index" : "not_analyzed" }, "quality" : { "type" : "string", - "index" : "not_analyzed", - "copy_to": "source-id" + "index" : "not_analyzed" } } }, -- cgit v1.2.3