From a875f00f817038b6e9c526f57a15b4bc0010b81f Mon Sep 17 00:00:00 2001
From: blavenie <benoit.lavenier@e-is.pro>
Date: Thu, 5 Jan 2017 02:48:31 +0100
Subject: [PATCH] enable security rest filter

---
 .../src/test/es-home/config/elasticsearch.yml  |  5 +++--
 duniter4j-es-user/src/main/misc/curl_test.sh   | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/duniter4j-es-assembly/src/test/es-home/config/elasticsearch.yml b/duniter4j-es-assembly/src/test/es-home/config/elasticsearch.yml
index 9f6a6d72..57a0be9d 100644
--- a/duniter4j-es-assembly/src/test/es-home/config/elasticsearch.yml
+++ b/duniter4j-es-assembly/src/test/es-home/config/elasticsearch.yml
@@ -19,6 +19,7 @@ cluster.name: duniter4j-elasticsearch-TEST
 #
 # ------------------------------------ Node ------------------------------------
 #
+#
 # Use a descriptive name for the node:
 #
 # node.name: node-1
@@ -139,8 +140,8 @@ duniter.keyring.password: def
 
 # Enable security, to disable HTTP access to the default ES admin API
 #
-#duniter.security.enable: true
-duniter.security.enable: false
+duniter.security.enable: true
+#duniter.security.enable: false
 #
 # Security token prefix (default: 'duniter-')
 #
diff --git a/duniter4j-es-user/src/main/misc/curl_test.sh b/duniter4j-es-user/src/main/misc/curl_test.sh
index 6a8ba33e..1c88ff48 100755
--- a/duniter4j-es-user/src/main/misc/curl_test.sh
+++ b/duniter4j-es-user/src/main/misc/curl_test.sh
@@ -87,3 +87,21 @@ curl -XPOST "http://127.0.0.1:9200/user/event/_search?pretty" -d'
 }'
 
 
+echo "--- GET market pictures content_type--- "
+curl -XPOST "http://127.0.0.1:9200/market/record/_search?pretty" -d'
+{
+  query: {
+    constant_score: {
+        filter: [
+          {term: { issuer: "5ocqzyDMMWf1V8bsoNhWb1iNwax1e9M7VTUN6navs8of"}}
+        ]
+      }
+  },
+  sort : [
+    { "time" : {"order" : "desc"}}
+  ],
+  from: 0,
+  size: 3,
+  _source: ["avatar._content_type"]
+}'
+
-- 
GitLab