summaryrefslogtreecommitdiff
path: root/src/es5
diff options
context:
space:
mode:
Diffstat (limited to 'src/es5')
-rw-r--r--src/es5/last-update.json9
-rwxr-xr-xsrc/es5/test-last-update-es8
2 files changed, 17 insertions, 0 deletions
diff --git a/src/es5/last-update.json b/src/es5/last-update.json
new file mode 100644
index 0000000..77146a3
--- /dev/null
+++ b/src/es5/last-update.json
@@ -0,0 +1,9 @@
+{
+ "query": {
+ "match": { "SourceHubUuid": "dd0c7f5c-82f0-4b95-8b5c-0559b2d976c3" }
+ },
+ "aggregations": {
+ "last-id" : { "max" : { "field": "SourceHubDataUpdateId" } }
+ }
+}
+
diff --git a/src/es5/test-last-update-es b/src/es5/test-last-update-es
new file mode 100755
index 0000000..44d4b93
--- /dev/null
+++ b/src/es5/test-last-update-es
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 <index>"
+ exit 1
+fi
+
+curl -XGET 'http://stream.elevate.at:9200/'"$1"'/dataupdate/_search?pretty' -d @last-update.json