From dc8bc8200bb7382abdaea06551d36386c7996ee0 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 27 Nov 2014 21:50:13 +0100 Subject: creating index with keyword tokenizer --- src/es5/create-index-es | 2 +- src/es5/sfive-init.json | 67 ++++++++++++++++++++++++++++++++++++++++++++++ src/es5/sfive-mapping.json | 56 -------------------------------------- src/hub/test-fwd-es | 2 +- 4 files changed, 69 insertions(+), 58 deletions(-) create mode 100644 src/es5/sfive-init.json delete mode 100644 src/es5/sfive-mapping.json (limited to 'src') diff --git a/src/es5/create-index-es b/src/es5/create-index-es index 7612f68..3318cea 100755 --- a/src/es5/create-index-es +++ b/src/es5/create-index-es @@ -5,4 +5,4 @@ if [ -z "$1" ]; then exit 1 fi -curl -XPOST 'http://stream.elevate.at:9200/'"$1"'?pretty' -d @sfive-mapping.json +curl -XPOST 'http://stream.elevate.at:9200/'"$1"'?pretty' -d @sfive-init.json diff --git a/src/es5/sfive-init.json b/src/es5/sfive-init.json new file mode 100644 index 0000000..75e284e --- /dev/null +++ b/src/es5/sfive-init.json @@ -0,0 +1,67 @@ +{ + "settings": { + "index" : { + "analysis" : { + "analyzer" : { + "default" : { + "type" : "keyword" + } + } + } + } + }, + "mappings" : { + "dataupdate" : { + "properties" : { + "source-id": { "type": "string" }, + "SourceHubDataUpdateId" : { + "type" : "long" + }, + "SourceHubUuid" : { + "type" : "string" + }, + "data" : { + "properties" : { + "bytes-received" : { + "type" : "long" + }, + "bytes-sent" : { + "type" : "long" + }, + "client-count" : { + "type" : "long" + } + } + }, + "duration-ms" : { + "type" : "long" + }, + "hostname" : { + "type" : "string", + "copy_to": "source-id" + }, + "start-time" : { + "type" : "date", + "format" : "dateOptionalTime" + }, + "streamer-id" : { + "properties" : { + "content-id" : { + "type" : "string", + "copy_to": "source-id" + }, + "format" : { + "type" : "string" + }, + "quality" : { + "type" : "string" + } + } + }, + "version" : { + "type" : "long" + } + } + } + } +} diff --git a/src/es5/sfive-mapping.json b/src/es5/sfive-mapping.json deleted file mode 100644 index 6ed1772..0000000 --- a/src/es5/sfive-mapping.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "mappings" : { - "dataupdate" : { - "properties" : { - "source-id": { "type": "string" }, - "SourceHubDataUpdateId" : { - "type" : "long" - }, - "SourceHubUuid" : { - "type" : "string" - }, - "data" : { - "properties" : { - "bytes-received" : { - "type" : "long" - }, - "bytes-sent" : { - "type" : "long" - }, - "client-count" : { - "type" : "long" - } - } - }, - "duration-ms" : { - "type" : "long" - }, - "hostname" : { - "type" : "string", - "copy_to": "source-id" - }, - "start-time" : { - "type" : "date", - "format" : "dateOptionalTime" - }, - "streamer-id" : { - "properties" : { - "content-id" : { - "type" : "string", - "copy_to": "source-id" - }, - "format" : { - "type" : "string" - }, - "quality" : { - "type" : "string" - } - } - }, - "version" : { - "type" : "long" - } - } - } - } -} diff --git a/src/hub/test-fwd-es b/src/hub/test-fwd-es index e54b0c2..3f3eb12 100755 --- a/src/hub/test-fwd-es +++ b/src/hub/test-fwd-es @@ -1,5 +1,5 @@ #!/bin/sh rm -f /run/sfive/pipe /run/sfive/pipegram -./bin/sfive-hub -start-pipe-server=false -start-pipegram-server=false -start-web-server=false -db db.sqlite -forward-es-url="http://localhost:9200/test" +./bin/sfive-hub -start-pipe-server=false -start-pipegram-server=false -start-web-server=false -db db.sqlite -forward-es-url="http://stream.elevate.at:9200/e14" -- cgit v1.2.3