From c86be1a778d925261c88e070ea07ab8c5fde27dd Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 27 Nov 2014 23:24:21 +0100 Subject: concatenation of source-id values work now --- src/es5/es-query.json | 2 +- src/es5/sfive-init.json | 28 +++++++++++++++------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/es5/es-query.json b/src/es5/es-query.json index c73d079..1be731d 100644 --- a/src/es5/es-query.json +++ b/src/es5/es-query.json @@ -3,7 +3,7 @@ { "by_hostname": { - "terms": { "script": "doc['source-id'].value" } + "terms": { "script": "doc['source-id'].values.join('/')" } }, "the_total_time": { diff --git a/src/es5/sfive-init.json b/src/es5/sfive-init.json index 75e284e..4ebfd92 100644 --- a/src/es5/sfive-init.json +++ b/src/es5/sfive-init.json @@ -1,24 +1,20 @@ { "settings": { - "index" : { - "analysis" : { - "analyzer" : { - "default" : { - "type" : "keyword" - } - } - } - } }, "mappings" : { "dataupdate" : { "properties" : { - "source-id": { "type": "string" }, + "source-id": { + "type": "string", + "index" : "not_analyzed", + "store": true + }, "SourceHubDataUpdateId" : { "type" : "long" }, "SourceHubUuid" : { - "type" : "string" + "type" : "string", + "index" : "not_analyzed" }, "data" : { "properties" : { @@ -38,6 +34,7 @@ }, "hostname" : { "type" : "string", + "index" : "not_analyzed", "copy_to": "source-id" }, "start-time" : { @@ -48,13 +45,18 @@ "properties" : { "content-id" : { "type" : "string", + "index" : "not_analyzed", "copy_to": "source-id" }, "format" : { - "type" : "string" + "type" : "string", + "index" : "not_analyzed", + "copy_to": "source-id" }, "quality" : { - "type" : "string" + "type" : "string", + "index" : "not_analyzed", + "copy_to": "source-id" } } }, -- cgit v1.2.3