You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2016/12/05 09:43:44 UTC

[1/4] incubator-unomi git commit: [jgitflow-maven-plugin]updating poms for unomi_70_es_5_x version

Repository: incubator-unomi
Updated Branches:
  refs/heads/feature-UNOMI-70-ES5X [created] 96a018ecb


[jgitflow-maven-plugin]updating poms for unomi_70_es_5_x version

Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/ff87e2f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/ff87e2f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/ff87e2f5

Branch: refs/heads/feature-UNOMI-70-ES5X
Commit: ff87e2f5567ad83da6b140e431bf16f31cd0b1f2
Parents: a4955ca
Author: Serge Huber <sh...@apache.org>
Authored: Mon Dec 5 09:51:42 2016 +0100
Committer: Serge Huber <sh...@apache.org>
Committed: Mon Dec 5 09:51:42 2016 +0100

----------------------------------------------------------------------
 api/pom.xml                                     |  2 +-
 extensions/geonames/pom.xml                     |  2 +-
 extensions/geonames/rest/pom.xml                |  8 +++---
 extensions/geonames/services/pom.xml            |  8 +++---
 extensions/lists-extension/pom.xml              |  4 +--
 extensions/lists-extension/rest/pom.xml         |  8 +++---
 extensions/lists-extension/services/pom.xml     |  8 +++---
 extensions/pom.xml                              |  2 +-
 extensions/privacy-extension/pom.xml            |  4 +--
 extensions/privacy-extension/rest/pom.xml       |  8 +++---
 extensions/privacy-extension/services/pom.xml   |  8 +++---
 itests/pom.xml                                  |  8 +++---
 kar/pom.xml                                     | 30 ++++++++++----------
 package/pom.xml                                 |  4 +--
 performance-tests/pom.xml                       |  4 +--
 persistence-elasticsearch/core/pom.xml          |  6 ++--
 persistence-elasticsearch/plugins/pom.xml       |  2 +-
 .../plugins/security/pom.xml                    |  2 +-
 persistence-elasticsearch/pom.xml               |  2 +-
 persistence-spi/pom.xml                         |  4 +--
 plugins/baseplugin/pom.xml                      |  6 ++--
 plugins/hover-event/pom.xml                     |  4 +--
 plugins/mail/pom.xml                            |  4 +--
 plugins/optimization-test/pom.xml               |  2 +-
 plugins/past-event/pom.xml                      |  6 ++--
 plugins/pom.xml                                 |  4 +--
 plugins/request/pom.xml                         |  2 +-
 plugins/tracked-event/pom.xml                   |  6 ++--
 pom.xml                                         |  2 +-
 rest/pom.xml                                    |  6 ++--
 samples/pom.xml                                 |  2 +-
 samples/tweet-button-plugin/pom.xml             |  4 +--
 services/pom.xml                                |  6 ++--
 wab/pom.xml                                     |  6 ++--
 34 files changed, 92 insertions(+), 92 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index 0f06620..cdf4fd8 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-api</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/extensions/geonames/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/geonames/pom.xml b/extensions/geonames/pom.xml
index f601a7c..61ae8f9 100644
--- a/extensions/geonames/pom.xml
+++ b/extensions/geonames/pom.xml
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-extensions</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>cxs-geonames</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/extensions/geonames/rest/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/geonames/rest/pom.xml b/extensions/geonames/rest/pom.xml
index 6798bfe..72a8e74 100644
--- a/extensions/geonames/rest/pom.xml
+++ b/extensions/geonames/rest/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>cxs-geonames</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -33,14 +33,14 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>cxs-geonames-services</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 
@@ -81,7 +81,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/extensions/geonames/services/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/geonames/services/pom.xml b/extensions/geonames/services/pom.xml
index e1e7310..3c1fc0b 100644
--- a/extensions/geonames/services/pom.xml
+++ b/extensions/geonames/services/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>cxs-geonames</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
@@ -28,20 +28,20 @@
     <artifactId>cxs-geonames-services</artifactId>
     <name>Apache Unomi :: Extensions :: Geonames Database :: Service</name>
     <description>Service implementation for the Apache Unomi Context Server extension that integrates with the Geonames database</description>
-    <version>1.2.0-incubating-SNAPSHOT</version>
+    <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/extensions/lists-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/lists-extension/pom.xml b/extensions/lists-extension/pom.xml
index d348ad9..b5bd423 100644
--- a/extensions/lists-extension/pom.xml
+++ b/extensions/lists-extension/pom.xml
@@ -27,12 +27,12 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-extensions</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>cxs-lists-extension</artifactId>
     <name>Apache Unomi :: Extensions :: Lists</name>
     <description>List extension for the Apache Unomi Context Server</description>
-    <version>1.2.0-incubating-SNAPSHOT</version>
+    <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     <packaging>pom</packaging>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/extensions/lists-extension/rest/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/lists-extension/rest/pom.xml b/extensions/lists-extension/rest/pom.xml
index 7a1f6b6..0988a06 100644
--- a/extensions/lists-extension/rest/pom.xml
+++ b/extensions/lists-extension/rest/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <artifactId>cxs-lists-extension</artifactId>
         <groupId>org.apache.unomi</groupId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -34,14 +34,14 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>cxs-lists-extension-services</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 
@@ -82,7 +82,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/extensions/lists-extension/services/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/lists-extension/services/pom.xml b/extensions/lists-extension/services/pom.xml
index d7ebedb..75f65f9 100644
--- a/extensions/lists-extension/services/pom.xml
+++ b/extensions/lists-extension/services/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <artifactId>cxs-lists-extension</artifactId>
         <groupId>org.apache.unomi</groupId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -28,20 +28,20 @@
     <name>Apache Unomi :: Extensions :: Lists :: Service</name>
     <description>List extension service implementation for the Apache Unomi Context Server</description>
 
-    <version>1.2.0-incubating-SNAPSHOT</version>
+    <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/extensions/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/pom.xml b/extensions/pom.xml
index aa9cb48..e556570 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-extensions</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/extensions/privacy-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/privacy-extension/pom.xml b/extensions/privacy-extension/pom.xml
index 46e4315..b23038c 100644
--- a/extensions/privacy-extension/pom.xml
+++ b/extensions/privacy-extension/pom.xml
@@ -27,12 +27,12 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-extensions</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>cxs-privacy-extension</artifactId>
     <name>Apache Unomi :: Extensions :: Privacy</name>
     <description>Privacy management extension for the Apache Unomi Context Server</description>
-    <version>1.2.0-incubating-SNAPSHOT</version>
+    <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     <packaging>pom</packaging>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/extensions/privacy-extension/rest/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/privacy-extension/rest/pom.xml b/extensions/privacy-extension/rest/pom.xml
index d6800cf..2bc7560 100644
--- a/extensions/privacy-extension/rest/pom.xml
+++ b/extensions/privacy-extension/rest/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <artifactId>cxs-privacy-extension</artifactId>
         <groupId>org.apache.unomi</groupId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -33,14 +33,14 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>cxs-privacy-extension-services</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 
@@ -81,7 +81,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/extensions/privacy-extension/services/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/privacy-extension/services/pom.xml b/extensions/privacy-extension/services/pom.xml
index 4afcde8..b685e84 100644
--- a/extensions/privacy-extension/services/pom.xml
+++ b/extensions/privacy-extension/services/pom.xml
@@ -20,27 +20,27 @@
     <parent>
         <artifactId>cxs-privacy-extension</artifactId>
         <groupId>org.apache.unomi</groupId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>cxs-privacy-extension-services</artifactId>
     <name>Apache Unomi :: Extensions :: Privacy :: Services</name>
     <description>Privacy management extension service implementation for the Apache Unomi Context Server</description>
-    <version>1.2.0-incubating-SNAPSHOT</version>
+    <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/itests/pom.xml
----------------------------------------------------------------------
diff --git a/itests/pom.xml b/itests/pom.xml
index e0426ce..b377177 100644
--- a/itests/pom.xml
+++ b/itests/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
     <artifactId>unomi-itests</artifactId>
     <name>Apache Unomi :: Integration Tests</name>
@@ -31,19 +31,19 @@
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-kar</artifactId>
             <classifier>features</classifier>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <type>xml</type>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-wab</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>
         

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/kar/pom.xml
----------------------------------------------------------------------
diff --git a/kar/pom.xml b/kar/pom.xml
index 7d6c400..cee6add 100644
--- a/kar/pom.xml
+++ b/kar/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-kar</artifactId>
@@ -33,72 +33,72 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-wab</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-services</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-elasticsearch-core</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-plugins-base</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-plugins-request</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-plugins-mail</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-plugins-optimization-test</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>cxs-lists-extension-services</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>cxs-lists-extension-rest</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>cxs-geonames-services</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>cxs-geonames-rest</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>cxs-privacy-extension-services</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>cxs-privacy-extension-rest</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.servicemix.bundles</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/package/pom.xml
----------------------------------------------------------------------
diff --git a/package/pom.xml b/package/pom.xml
index b3f7448..e2a8d1c 100644
--- a/package/pom.xml
+++ b/package/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi</artifactId>
@@ -75,7 +75,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-kar</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <classifier>features</classifier>
             <type>xml</type>
             <scope>runtime</scope>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/performance-tests/pom.xml
----------------------------------------------------------------------
diff --git a/performance-tests/pom.xml b/performance-tests/pom.xml
index 72c7abd..9a6b4ad 100644
--- a/performance-tests/pom.xml
+++ b/performance-tests/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
     <artifactId>unomi-performance-tests</artifactId>
     <name>Apache Unomi :: Performance Tests</name>
@@ -30,7 +30,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-wab</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/persistence-elasticsearch/core/pom.xml
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/pom.xml b/persistence-elasticsearch/core/pom.xml
index 891da68..e633df1 100644
--- a/persistence-elasticsearch/core/pom.xml
+++ b/persistence-elasticsearch/core/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-persistence-elasticsearch</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-persistence-elasticsearch-core</artifactId>
@@ -39,13 +39,13 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/persistence-elasticsearch/plugins/pom.xml
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/plugins/pom.xml b/persistence-elasticsearch/plugins/pom.xml
index 9e361c0..ccb075e 100644
--- a/persistence-elasticsearch/plugins/pom.xml
+++ b/persistence-elasticsearch/plugins/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-persistence-elasticsearch</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-persistence-elasticsearch-plugins</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/persistence-elasticsearch/plugins/security/pom.xml
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/plugins/security/pom.xml b/persistence-elasticsearch/plugins/security/pom.xml
index b029a8c..1028e95 100644
--- a/persistence-elasticsearch/plugins/security/pom.xml
+++ b/persistence-elasticsearch/plugins/security/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-persistence-elasticsearch-plugins</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-persistence-elasticsearch-plugins-security</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/persistence-elasticsearch/pom.xml
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/pom.xml b/persistence-elasticsearch/pom.xml
index 99ef177..3cace61 100644
--- a/persistence-elasticsearch/pom.xml
+++ b/persistence-elasticsearch/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-persistence-elasticsearch</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/persistence-spi/pom.xml
----------------------------------------------------------------------
diff --git a/persistence-spi/pom.xml b/persistence-spi/pom.xml
index 68d5ba7..50bd36f 100644
--- a/persistence-spi/pom.xml
+++ b/persistence-spi/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-persistence-spi</artifactId>
@@ -33,7 +33,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/plugins/baseplugin/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/pom.xml b/plugins/baseplugin/pom.xml
index 078cfb8..4aa9d54 100644
--- a/plugins/baseplugin/pom.xml
+++ b/plugins/baseplugin/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-plugins</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-plugins-base</artifactId>
@@ -55,13 +55,13 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-elasticsearch-core</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/plugins/hover-event/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/hover-event/pom.xml b/plugins/hover-event/pom.xml
index 979aa35..980cb84 100644
--- a/plugins/hover-event/pom.xml
+++ b/plugins/hover-event/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-plugins</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-plugins-hover-event</artifactId>
@@ -33,7 +33,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-elasticsearch-core</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/plugins/mail/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/mail/pom.xml b/plugins/mail/pom.xml
index 2bdcdd3..146c9c4 100644
--- a/plugins/mail/pom.xml
+++ b/plugins/mail/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-plugins</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-plugins-mail</artifactId>
@@ -33,7 +33,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/plugins/optimization-test/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/optimization-test/pom.xml b/plugins/optimization-test/pom.xml
index f034ed2..04926da 100644
--- a/plugins/optimization-test/pom.xml
+++ b/plugins/optimization-test/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-plugins</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-plugins-optimization-test</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/plugins/past-event/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/past-event/pom.xml b/plugins/past-event/pom.xml
index 7f63535..520808f 100644
--- a/plugins/past-event/pom.xml
+++ b/plugins/past-event/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-plugins</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-plugins-past-event</artifactId>
@@ -33,13 +33,13 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-elasticsearch-core</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/plugins/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/pom.xml b/plugins/pom.xml
index 35d1fbd..77d9535 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-plugins</artifactId>
@@ -43,7 +43,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/plugins/request/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/request/pom.xml b/plugins/request/pom.xml
index 1764ed1..08e7a5a 100644
--- a/plugins/request/pom.xml
+++ b/plugins/request/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-plugins</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-plugins-request</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/plugins/tracked-event/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/tracked-event/pom.xml b/plugins/tracked-event/pom.xml
index bb47811..874e723 100644
--- a/plugins/tracked-event/pom.xml
+++ b/plugins/tracked-event/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-plugins</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-plugins-tracked-event</artifactId>
@@ -33,13 +33,13 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-elasticsearch-core</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e6a8f4a..aaced29 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
         provides a high-performance user profile and event tracking server.
     </description>
     <url>http://unomi.incubator.apache.org</url>
-    <version>1.2.0-incubating-SNAPSHOT</version>
+    <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <licenses>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/rest/pom.xml
----------------------------------------------------------------------
diff --git a/rest/pom.xml b/rest/pom.xml
index bba4a5a..f795ff1 100644
--- a/rest/pom.xml
+++ b/rest/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-rest</artifactId>
@@ -46,7 +46,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 
@@ -93,7 +93,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <!--<dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/samples/pom.xml
----------------------------------------------------------------------
diff --git a/samples/pom.xml b/samples/pom.xml
index 8941427..20a0403 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>unomi-root</artifactId>
         <groupId>org.apache.unomi</groupId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/samples/tweet-button-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/samples/tweet-button-plugin/pom.xml b/samples/tweet-button-plugin/pom.xml
index c1725d5..8d5076c 100644
--- a/samples/tweet-button-plugin/pom.xml
+++ b/samples/tweet-button-plugin/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>samples</artifactId>
         <groupId>org.apache.unomi</groupId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>tweet-button-plugin</artifactId>
@@ -33,7 +33,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/services/pom.xml
----------------------------------------------------------------------
diff --git a/services/pom.xml b/services/pom.xml
index abd3cc1..c90ebba 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-services</artifactId>
@@ -33,7 +33,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 
@@ -52,7 +52,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ff87e2f5/wab/pom.xml
----------------------------------------------------------------------
diff --git a/wab/pom.xml b/wab/pom.xml
index 5af699f..d89cceb 100644
--- a/wab/pom.xml
+++ b/wab/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.2.0-incubating-SNAPSHOT</version>
+        <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-wab</artifactId>
@@ -42,13 +42,13 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-persistence-spi</artifactId>
-            <version>1.2.0-incubating-SNAPSHOT</version>
+            <version>1.2.0-incubating-unomi_70_es_5_x-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 



[4/4] incubator-unomi git commit: UNOMI 70 - Upgrade to ElasticSearch 5.0 - Upgrade to ElasticSearch 5.0.1 - Upgrade CXF to 3.0.2 - Upgrade to Karaf 3.0.8 - Replace Unomi clustering from ES clustering to Karaf Cellar clustering

Posted by sh...@apache.org.
UNOMI 70 - Upgrade to ElasticSearch 5.0
- Upgrade to ElasticSearch 5.0.1
- Upgrade CXF to 3.0.2
- Upgrade to Karaf 3.0.8
- Replace Unomi clustering from ES clustering to Karaf Cellar clustering


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/96a018ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/96a018ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/96a018ec

Branch: refs/heads/feature-UNOMI-70-ES5X
Commit: 96a018ecb1b5b907930504e69f6da9357db8385e
Parents: 90eb893
Author: Serge Huber <sh...@apache.org>
Authored: Mon Dec 5 10:43:29 2016 +0100
Committer: Serge Huber <sh...@apache.org>
Committed: Mon Dec 5 10:43:29 2016 +0100

----------------------------------------------------------------------
 extensions/geonames/rest/pom.xml                |   5 -
 .../META-INF/cxs/mappings/geonameEntry.json     |  42 +-
 extensions/lists-extension/rest/pom.xml         |   5 -
 .../META-INF/cxs/mappings/userList.json         |  23 +-
 extensions/privacy-extension/rest/pom.xml       |   5 -
 itests/pom.xml                                  |  41 +-
 kar/src/main/feature/feature.xml                |   2 +-
 package/pom.xml                                 |  36 +-
 persistence-elasticsearch/core/pom.xml          | 115 +++--
 .../ElasticSearchPersistenceServiceImpl.java    | 490 ++++++++++---------
 .../META-INF/cxs/mappings/actionType.json       |   4 +-
 .../META-INF/cxs/mappings/campaign.json         |  32 +-
 .../META-INF/cxs/mappings/campaignevent.json    |  30 +-
 .../META-INF/cxs/mappings/conditionType.json    |  66 ++-
 .../resources/META-INF/cxs/mappings/event.json  | 319 +++++++++++-
 .../resources/META-INF/cxs/mappings/goal.json   |  28 +-
 .../META-INF/cxs/mappings/persona.json          |  22 +-
 .../META-INF/cxs/mappings/personaSession.json   |  81 ++-
 .../META-INF/cxs/mappings/profile.json          |  42 +-
 .../META-INF/cxs/mappings/propertyType.json     |  45 +-
 .../resources/META-INF/cxs/mappings/rule.json   |  21 +-
 .../META-INF/cxs/mappings/scoring.json          |  25 +-
 .../META-INF/cxs/mappings/segment.json          |  21 +-
 .../META-INF/cxs/mappings/session.json          |  35 +-
 .../resources/OSGI-INF/blueprint/blueprint.xml  |  26 +-
 .../core/src/main/resources/log4j2.xml          |  29 ++
 ...g.apache.unomi.persistence.elasticsearch.cfg |   7 +-
 .../plugin/security/SecurityPlugin.java         |  34 +-
 .../plugin/security/SecurityPluginService.java  |   7 +-
 .../persistence/spi/PersistenceService.java     |   8 -
 .../BooleanConditionESQueryBuilder.java         |  18 +-
 ...onByPointSessionConditionESQueryBuilder.java |   6 +-
 .../conditions/PropertyConditionEvaluator.java  |   4 +-
 pom.xml                                         |  31 +-
 rest/pom.xml                                    |   5 -
 services/pom.xml                                |  10 -
 36 files changed, 1132 insertions(+), 588 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/extensions/geonames/rest/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/geonames/rest/pom.xml b/extensions/geonames/rest/pom.xml
index 72a8e74..ff52075 100644
--- a/extensions/geonames/rest/pom.xml
+++ b/extensions/geonames/rest/pom.xml
@@ -52,11 +52,6 @@
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-core</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxws</artifactId>
             <scope>provided</scope>
         </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/extensions/geonames/services/src/main/resources/META-INF/cxs/mappings/geonameEntry.json
----------------------------------------------------------------------
diff --git a/extensions/geonames/services/src/main/resources/META-INF/cxs/mappings/geonameEntry.json b/extensions/geonames/services/src/main/resources/META-INF/cxs/mappings/geonameEntry.json
index 63664fe..612f3ca 100644
--- a/extensions/geonames/services/src/main/resources/META-INF/cxs/mappings/geonameEntry.json
+++ b/extensions/geonames/services/src/main/resources/META-INF/cxs/mappings/geonameEntry.json
@@ -2,56 +2,46 @@
   "geonameEntry": {
     "properties": {
       "admin1Code": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "admin2Code": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "admin3Code": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "admin4Code": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "alternatenames": {
-        "type": "string"
+        "type": "keyword"
       },
       "asciiname": {
-        "type": "string"
+        "type": "keyword"
       },
       "cc2": {
-        "type": "string"
+        "type": "keyword"
       },
       "countryCode": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "dem": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "elevation": {
         "type": "long"
       },
       "featureClass": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "featureCode": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "location": {
         "type": "geo_point"
@@ -61,15 +51,13 @@
         "format": "strict_date_optional_time||epoch_millis"
       },
       "name": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "population": {
         "type": "long"
       },
       "timezone": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/extensions/lists-extension/rest/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/lists-extension/rest/pom.xml b/extensions/lists-extension/rest/pom.xml
index 0988a06..f2d31ad 100644
--- a/extensions/lists-extension/rest/pom.xml
+++ b/extensions/lists-extension/rest/pom.xml
@@ -53,11 +53,6 @@
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-core</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxws</artifactId>
             <scope>provided</scope>
         </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/extensions/lists-extension/services/src/main/resources/META-INF/cxs/mappings/userList.json
----------------------------------------------------------------------
diff --git a/extensions/lists-extension/services/src/main/resources/META-INF/cxs/mappings/userList.json b/extensions/lists-extension/services/src/main/resources/META-INF/cxs/mappings/userList.json
index 3bb8ae0..244d71a 100644
--- a/extensions/lists-extension/services/src/main/resources/META-INF/cxs/mappings/userList.json
+++ b/extensions/lists-extension/services/src/main/resources/META-INF/cxs/mappings/userList.json
@@ -4,27 +4,25 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "text",
+            "analyzer" : "folding"
           }
         }
       }
     ],
     "properties": {
       "itemId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "metadata": {
         "properties": {
           "description": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           },
           "enabled": {
@@ -34,22 +32,19 @@
             "type": "boolean"
           },
           "id": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "missingPlugins": {
             "type": "boolean"
           },
           "name": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "readOnly": {
             "type": "boolean"
           },
           "scope": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/extensions/privacy-extension/rest/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/privacy-extension/rest/pom.xml b/extensions/privacy-extension/rest/pom.xml
index 2bc7560..7c51644 100644
--- a/extensions/privacy-extension/rest/pom.xml
+++ b/extensions/privacy-extension/rest/pom.xml
@@ -52,11 +52,6 @@
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-core</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxws</artifactId>
             <scope>provided</scope>
         </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/itests/pom.xml
----------------------------------------------------------------------
diff --git a/itests/pom.xml b/itests/pom.xml
index 285a2f6..11e0a94 100644
--- a/itests/pom.xml
+++ b/itests/pom.xml
@@ -134,13 +134,52 @@
                 </executions>
             </plugin>
             <plugin>
+                <groupId>com.github.alexcojocaru</groupId>
+                <artifactId>elasticsearch-maven-plugin</artifactId>
+                <!-- REPLACE THE FOLLOWING WITH THE PLUGIN VERSION YOU NEED -->
+                <version>5.0</version>
+                <configuration>
+                    <clusterName>contextElasticSearch</clusterName>
+                    <tcpPort>9300</tcpPort>
+                    <httpPort>9200</httpPort>
+                </configuration>
+                <executions>
+                    <!--
+                        The elasticsearch maven plugin goals are by default bound to the
+                        pre-integration-test and post-integration-test phases
+                    -->
+                    <execution>
+                        <id>start-elasticsearch</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>runforked</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>stop-elasticsearch</id>
+                        <phase>post-integration-test</phase>
+                        <goals>
+                            <goal>stop</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
+                <artifactId>maven-failsafe-plugin</artifactId>
                 <configuration>
                     <includes>
                         <include>**/*AllTests.java</include>
                     </includes>
                 </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>integration-test</goal>
+                            <goal>verify</goal>
+                        </goals>
+                    </execution>
+                </executions>
             </plugin>
         </plugins>
     </build>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/kar/src/main/feature/feature.xml
----------------------------------------------------------------------
diff --git a/kar/src/main/feature/feature.xml b/kar/src/main/feature/feature.xml
index 5517a19..39413fb 100644
--- a/kar/src/main/feature/feature.xml
+++ b/kar/src/main/feature/feature.xml
@@ -20,7 +20,7 @@
     <feature description="unomi-kar" version="${project.version}" name="unomi-kar"
              start-level="75">
         <feature>war</feature>
-        <feature version="[2.7.11,3)">cxf</feature>
+        <feature>cxf</feature>
         <feature>openwebbeans</feature>
         <feature>pax-cdi-web-openwebbeans</feature>
         <configfile finalname="/etc/org.apache.unomi.web.cfg">mvn:org.apache.unomi/unomi-wab/${project.version}/cfg/unomicfg</configfile>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/package/pom.xml
----------------------------------------------------------------------
diff --git a/package/pom.xml b/package/pom.xml
index 4a39217..6f622d9 100644
--- a/package/pom.xml
+++ b/package/pom.xml
@@ -64,14 +64,23 @@
             <scope>runtime</scope>
         </dependency>
 
+        <!--
         <dependency>
-            <!-- scope is runtime so the feature repo is listed in the features service config file, and features may be installed using the karaf-maven-plugin configuration -->
             <groupId>org.apache.cxf.karaf</groupId>
             <artifactId>apache-cxf</artifactId>
             <classifier>features</classifier>
             <type>xml</type>
             <scope>runtime</scope>
         </dependency>
+        -->
+        <dependency>
+            <groupId>org.apache.karaf.cellar</groupId>
+            <artifactId>apache-karaf-cellar</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-kar</artifactId>
@@ -167,30 +176,8 @@
                                     <artifactItems>
                                         <artifactItem>
                                             <groupId>org.elasticsearch.plugin</groupId>
-                                            <artifactId>delete-by-query</artifactId>
-                                            <version>${elasticsearch.version}</version>
-                                            <type>zip</type>
-                                            <outputDirectory>${project.build.directory}/assembly/elasticsearch/plugins/delete-by-query</outputDirectory>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.elasticsearch.module</groupId>
-                                            <artifactId>lang-groovy</artifactId>
-                                            <version>${elasticsearch.version}</version>
-                                            <type>zip</type>
-                                            <outputDirectory>${project.build.directory}/assembly/elasticsearch/modules/lang-groovy</outputDirectory>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.elasticsearch.module</groupId>
-                                            <artifactId>lang-expression</artifactId>
-                                            <version>${elasticsearch.version}</version>
-                                            <type>zip</type>
-                                            <outputDirectory>${project.build.directory}/assembly/elasticsearch/modules/lang-expression</outputDirectory>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.elasticsearch.module</groupId>
-                                            <artifactId>reindex</artifactId>
+                                            <artifactId>reindex-client</artifactId>
                                             <version>${elasticsearch.version}</version>
-                                            <type>zip</type>
                                             <outputDirectory>${project.build.directory}/assembly/elasticsearch/modules/reindex</outputDirectory>
                                         </artifactItem>
                                     </artifactItems>
@@ -299,6 +286,7 @@
                                 <feature>cxf</feature>
                                 <feature>openwebbeans</feature>
                                 <feature>pax-cdi-web-openwebbeans</feature>
+                                <feature>cellar</feature>
                                 <feature>unomi-kar</feature>
                             </bootFeatures>
                         </configuration>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/pom.xml
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/pom.xml b/persistence-elasticsearch/core/pom.xml
index 6380219..6a05775 100644
--- a/persistence-elasticsearch/core/pom.xml
+++ b/persistence-elasticsearch/core/pom.xml
@@ -35,6 +35,11 @@
             <artifactId>org.osgi.core</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>provided</scope>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.unomi</groupId>
@@ -49,14 +54,29 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.karaf.cellar</groupId>
+            <artifactId>org.apache.karaf.cellar.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.cellar</groupId>
+            <artifactId>org.apache.karaf.cellar.config</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>20.0</version>
+        </dependency>
+        <dependency>
             <groupId>org.elasticsearch</groupId>
             <artifactId>elasticsearch</artifactId>
             <version>${elasticsearch.version}</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
-            <groupId>org.elasticsearch.plugin</groupId>
-            <artifactId>delete-by-query</artifactId>
+            <groupId>org.elasticsearch.client</groupId>
+            <artifactId>transport</artifactId>
             <version>${elasticsearch.version}</version>
             <scope>compile</scope>
         </dependency>
@@ -64,41 +84,43 @@
         <!-- The following are optional dependencies from the ElasticSearch that are made mandatory -->
 
         <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-core</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>log4j-over-slf4j</artifactId>
-            <version>1.7.7</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>net.java.dev.jna</groupId>
-            <artifactId>jna</artifactId>
-            <version>4.1.0</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.github.spullara.mustache.java</groupId>
-            <artifactId>compiler</artifactId>
-            <version>0.8.13</version>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <version>2.6.2</version>
             <scope>compile</scope>
+            <optional>true</optional>
         </dependency>
         <dependency>
-            <groupId>org.scala-lang</groupId>
-            <artifactId>scala-library</artifactId>
-            <version>2.8.1</version>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <version>2.6.2</version>
             <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-api</artifactId>
+                </exclusion>
+            </exclusions>
+            <optional>true</optional>
         </dependency>
         <dependency>
-            <groupId>org.noggit</groupId>
-            <artifactId>noggit</artifactId>
-            <version>0.7</version>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-1.2-api</artifactId>
+            <version>2.6.2</version>
             <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-core</artifactId>
+                </exclusion>
+            </exclusions>
+            <optional>true</optional>
         </dependency>
+
         <!-- End of optional ElasticSearch dependencies -->
 
         <dependency>
@@ -169,6 +191,39 @@
                             sun.misc;resolution:=optional,
                             sun.security.util;resolution:=optional,
                             sun.security.x509;resolution:=optional,
+                            com.google.protobuf.nano;resolution:=optional,
+                            com.jcraft.jzlib;resolution:=optional,
+                            com.ning.compress;resolution:=optional,
+                            com.ning.compress.lzf;resolution:=optional,
+                            com.ning.compress.lzf.util;resolution:=optional,
+                            javassist;resolution:=optional,
+                            lzma.sdk;resolution:=optional,
+                            lzma.sdk.lzma;resolution:=optional,
+                            net.jpountz.lz4;resolution:=optional,
+                            net.jpountz.xxhash;resolution:=optional,
+                            org.apache.tomcat;resolution:=optional,
+                            org.eclipse.jetty.alpn;resolution:=optional,
+                            org.joda.convert;resolution:=optional,
+                            org.locationtech.spatial4j.context;resolution:=optional,
+                            org.locationtech.spatial4j.context.jts;resolution:=optional,
+                            org.locationtech.spatial4j.distance;resolution:=optional,
+                            org.locationtech.spatial4j.exception;resolution:=optional,
+                            org.locationtech.spatial4j.io;resolution:=optional,
+                            org.locationtech.spatial4j.shape;resolution:=optional,
+                            org.locationtech.spatial4j.shape.impl;resolution:=optional,
+                            org.locationtech.spatial4j.shape.jts;resolution:=optional,
+                            org.zeromq;resolution:=optional,
+                            org.apache.commons.compress.compressors;resolution:=optional,
+                            org.apache.commons.compress.utils;resolution:=optional,
+                            org.apache.commons.csv;resolution:=optional,
+                            org.apache.kafka.clients.producer;resolution:=optional,
+                            javax.persistence;resolution:=optional,
+                            com.google.errorprone.annotations.concurrent;resolution:=optional,
+                            com.lmax.disruptor;resolution:=optional,
+                            com.lmax.disruptor.dsl;resolution:=optional,
+                            com.fasterxml.jackson.dataformat.xml;resolution:=optional,
+                            com.fasterxml.jackson.dataformat.xml.annotation;resolution:=optional,
+                            com.fasterxml.jackson.dataformat.xml.util;resolution:=optional,
                             *
                         </Import-Package>
                         <Export-Package>
@@ -176,7 +231,7 @@
                             org.elasticsearch.index.query.*;version="${elasticsearch.version}",
                             org.apache.unomi.persistence.elasticsearch.conditions;version="${project.version}"
                         </Export-Package>
-                        <Embed-Dependency>*;scope=compile|runtime;artifactId=!log4j</Embed-Dependency>
+                        <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
                         <Embed-Transitive>true</Embed-Transitive>
                     </instructions>
                 </configuration>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
index 794b03b..0dc3899 100644
--- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
+++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
@@ -17,7 +17,13 @@
 
 package org.apache.unomi.persistence.elasticsearch;
 
-import com.google.common.collect.UnmodifiableIterator;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.karaf.cellar.config.ClusterConfigurationEvent;
+import org.apache.karaf.cellar.config.Constants;
+import org.apache.karaf.cellar.core.*;
+import org.apache.karaf.cellar.core.control.SwitchStatus;
+import org.apache.karaf.cellar.core.event.EventProducer;
+import org.apache.karaf.cellar.core.event.EventType;
 import org.apache.unomi.api.ClusterNode;
 import org.apache.unomi.api.Item;
 import org.apache.unomi.api.PartialList;
@@ -31,33 +37,22 @@ import org.apache.unomi.persistence.elasticsearch.conditions.*;
 import org.apache.unomi.persistence.spi.CustomObjectMapper;
 import org.apache.unomi.persistence.spi.PersistenceService;
 import org.apache.unomi.persistence.spi.aggregate.*;
-import org.elasticsearch.action.admin.cluster.node.info.NodeInfo;
-import org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequest;
-import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
-import org.elasticsearch.action.admin.cluster.node.stats.NodeStats;
-import org.elasticsearch.action.admin.cluster.node.stats.NodesStatsResponse;
 import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder;
 import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsResponse;
 import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
 import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse;
 import org.elasticsearch.action.bulk.*;
-import org.elasticsearch.action.deletebyquery.DeleteByQueryAction;
-import org.elasticsearch.action.deletebyquery.DeleteByQueryRequestBuilder;
-import org.elasticsearch.action.deletebyquery.DeleteByQueryResponse;
 import org.elasticsearch.action.get.GetResponse;
 import org.elasticsearch.action.index.IndexRequestBuilder;
-import org.elasticsearch.action.percolate.PercolateResponse;
 import org.elasticsearch.action.search.SearchRequestBuilder;
 import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.action.search.SearchType;
+import org.elasticsearch.action.support.WriteRequest;
 import org.elasticsearch.action.update.UpdateRequest;
 import org.elasticsearch.client.Client;
 import org.elasticsearch.client.Requests;
-import org.elasticsearch.client.transport.TransportClient;
 import org.elasticsearch.cluster.metadata.MappingMetaData;
 import org.elasticsearch.common.collect.ImmutableOpenMap;
 import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.settings.SettingsException;
 import org.elasticsearch.common.transport.InetSocketTransportAddress;
 import org.elasticsearch.common.unit.ByteSizeUnit;
 import org.elasticsearch.common.unit.ByteSizeValue;
@@ -67,7 +62,6 @@ import org.elasticsearch.index.IndexNotFoundException;
 import org.elasticsearch.index.query.QueryBuilder;
 import org.elasticsearch.index.query.QueryBuilders;
 import org.elasticsearch.index.query.RangeQueryBuilder;
-import org.elasticsearch.node.Node;
 import org.elasticsearch.script.Script;
 import org.elasticsearch.script.ScriptService;
 import org.elasticsearch.search.SearchHit;
@@ -77,91 +71,86 @@ import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation;
 import org.elasticsearch.search.aggregations.bucket.SingleBucketAggregation;
 import org.elasticsearch.search.aggregations.bucket.filter.Filter;
 import org.elasticsearch.search.aggregations.bucket.global.Global;
-import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramBuilder;
+import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder;
 import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval;
-import org.elasticsearch.search.aggregations.bucket.missing.MissingBuilder;
-import org.elasticsearch.search.aggregations.bucket.range.RangeBuilder;
-import org.elasticsearch.search.aggregations.bucket.range.date.DateRangeBuilder;
-import org.elasticsearch.search.aggregations.bucket.range.ipv4.IPv4RangeBuilder;
+import org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder;
+import org.elasticsearch.search.aggregations.bucket.range.RangeAggregationBuilder;
+import org.elasticsearch.search.aggregations.bucket.range.date.DateRangeAggregationBuilder;
+import org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder;
 import org.elasticsearch.search.aggregations.metrics.InternalNumericMetricsAggregation;
 import org.elasticsearch.search.sort.GeoDistanceSortBuilder;
 import org.elasticsearch.search.sort.SortBuilders;
 import org.elasticsearch.search.sort.SortOrder;
+import org.elasticsearch.transport.client.PreBuiltTransportClient;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.SynchronousBundleListener;
+import org.osgi.service.cm.ConfigurationAdmin;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.management.*;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
 import java.io.BufferedReader;
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
-import java.net.*;
-import java.nio.file.Paths;
+import java.lang.management.ManagementFactory;
+import java.lang.management.OperatingSystemMXBean;
+import java.lang.management.RuntimeMXBean;
+import java.net.InetAddress;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.UnknownHostException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 
-import static org.elasticsearch.node.NodeBuilder.nodeBuilder;
-
 @SuppressWarnings("rawtypes")
 public class ElasticSearchPersistenceServiceImpl implements PersistenceService, ClusterService, SynchronousBundleListener {
 
     private static final Logger logger = LoggerFactory.getLogger(ElasticSearchPersistenceServiceImpl.class.getName());
 
-    public static final String DISCOVERY_ZEN_PING_MULTICAST_ENABLED = "discovery.zen.ping.multicast.enabled";
     public static final String CONTEXTSERVER_ADDRESS = "contextserver.address";
     public static final String CONTEXTSERVER_PORT = "contextserver.port";
     public static final String CONTEXTSERVER_SECURE_ADDRESS = "contextserver.secureAddress";
     public static final String CONTEXTSERVER_SECURE_PORT = "contextserver.securePort";
-    public static final String KARAF_HOME = "karaf.home";
-    public static final String ELASTICSEARCH_HOME_DIRECTORY = "elasticsearch";
-    public static final String ELASTICSEARCH_PLUGINS_DIRECTORY = ELASTICSEARCH_HOME_DIRECTORY + "/plugins";
-    public static final String ELASTICSEARCH_DATA_DIRECTORY = ELASTICSEARCH_HOME_DIRECTORY + "/data";
-    public static final String INDEX_NUMBER_OF_REPLICAS = "index.number_of_replicas";
-    public static final String INDEX_NUMBER_OF_SHARDS = "index.number_of_shards";
-    public static final String NODE_CONTEXTSERVER_ADDRESS = "node.contextserver.address";
-    public static final String NODE_CONTEXTSERVER_PORT = "node.contextserver.port";
-    public static final String NODE_CONTEXTSERVER_SECURE_ADDRESS = "node.contextserver.secureAddress";
-    public static final String NODE_CONTEXTSERVER_SECURE_PORT = "node.contextserver.securePort";
     public static final String NUMBER_OF_SHARDS = "number_of_shards";
     public static final String NUMBER_OF_REPLICAS = "number_of_replicas";
     public static final String CLUSTER_NAME = "cluster.name";
-    public static final String NODE_DATA = "node.data";
-    public static final String PATH_DATA = "path.data";
-    public static final String PATH_HOME = "path.home";
-    public static final String PATH_PLUGINS = "path.plugins";
-    public static final String INDEX_MAX_RESULT_WINDOW = "index.max_result_window";
-    public static final String MAPPER_ALLOW_DOTS_IN_NAME = "mapper.allow_dots_in_name";
     public static final String BULK_PROCESSOR_NAME = "bulkProcessor.name";
     public static final String BULK_PROCESSOR_CONCURRENT_REQUESTS = "bulkProcessor.concurrentRequests";
     public static final String BULK_PROCESSOR_BULK_ACTIONS = "bulkProcessor.bulkActions";
     public static final String BULK_PROCESSOR_BULK_SIZE = "bulkProcessor.bulkSize";
     public static final String BULK_PROCESSOR_FLUSH_INTERVAL = "bulkProcessor.flushInterval";
     public static final String BULK_PROCESSOR_BACKOFF_POLICY = "bulkProcessor.backoffPolicy";
-    public static final String ELASTICSEARCH_NETWORK_HOST = "network.host";
+    public static final String KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION = "org.apache.unoni.nodes";
+    public static final String KARAF_CLUSTER_CONFIGURATION_PUBLIC_ENDPOINTS = "publicEndpoints";
+    public static final String KARAF_CLUSTER_CONFIGURATION_SECURE_ENDPOINTS = "secureEndpoints";
 
-    private Node node;
-    private Client nodeClient;
     private Client client;
     private BulkProcessor bulkProcessor;
     private String clusterName;
     private String indexName;
     private String monthlyIndexNumberOfShards;
     private String monthlyIndexNumberOfReplicas;
-    private String numberOfShards;
-    private String numberOfReplicas;
-    private Boolean nodeData;
-    private Boolean discoveryEnabled;
     private String elasticSearchConfig = null;
     private BundleContext bundleContext;
     private Map<String, String> mappings = new HashMap<String, String>();
     private ConditionEvaluatorDispatcher conditionEvaluatorDispatcher;
     private ConditionESQueryBuilderDispatcher conditionESQueryBuilderDispatcher;
+    private ClusterManager karafCellarClusterManager;
+    private EventProducer karafCellarEventProducer;
+    private GroupManager karafCellarGroupManager;
+    private String karafCellarGroupName = Configurations.DEFAULT_GROUP_NAME;
+    private ConfigurationAdmin osgiConfigurationAdmin;
+    private String karafJMXUsername = "karaf";
+    private String karafJMXPassword = "karaf";
+    private int karafJMXPort = 1099;
 
     private Map<String,String> indexNames;
     private List<String> itemsMonthlyIndexed;
@@ -203,22 +192,6 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
         this.monthlyIndexNumberOfReplicas = monthlyIndexNumberOfReplicas;
     }
 
-    public void setDiscoveryEnabled(Boolean discoveryEnabled) {
-        this.discoveryEnabled = discoveryEnabled;
-    }
-
-    public void setNumberOfShards(String numberOfShards) {
-        this.numberOfShards = numberOfShards;
-    }
-
-    public void setNumberOfReplicas(String numberOfReplicas) {
-        this.numberOfReplicas = numberOfReplicas;
-    }
-
-    public void setNodeData(Boolean nodeData) {
-        this.nodeData = nodeData;
-    }
-
     public void setAddress(String address) {
         this.address = address;
     }
@@ -287,6 +260,38 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
         this.bulkProcessorBackoffPolicy = bulkProcessorBackoffPolicy;
     }
 
+    public void setKarafCellarClusterManager(ClusterManager karafCellarClusterManager) {
+        this.karafCellarClusterManager = karafCellarClusterManager;
+    }
+
+    public void setKarafCellarEventProducer(EventProducer karafCellarEventProducer) {
+        this.karafCellarEventProducer = karafCellarEventProducer;
+    }
+
+    public void setKarafCellarGroupManager(GroupManager karafCellarGroupManager) {
+        this.karafCellarGroupManager = karafCellarGroupManager;
+    }
+
+    public void setKarafCellarGroupName(String karafCellarGroupName) {
+        this.karafCellarGroupName = karafCellarGroupName;
+    }
+
+    public void setOsgiConfigurationAdmin(ConfigurationAdmin osgiConfigurationAdmin) {
+        this.osgiConfigurationAdmin = osgiConfigurationAdmin;
+    }
+
+    public void setKarafJMXUsername(String karafJMXUsername) {
+        this.karafJMXUsername = karafJMXUsername;
+    }
+
+    public void setKarafJMXPassword(String karafJMXPassword) {
+        this.karafJMXPassword = karafJMXPassword;
+    }
+
+    public void setKarafJMXPort(int karafJMXPort) {
+        this.karafJMXPort = karafJMXPort;
+    }
+
     public void start() {
 
         loadPredefinedMappings(bundleContext, false);
@@ -294,29 +299,58 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
         // on startup
         new InClassLoaderExecute<Object>() {
             public Object execute(Object... args) {
-                logger.info("Starting ElasticSearch persistence backend using cluster name " + clusterName + " and index name " + indexName + "...");
-                Map<String, String> settings = null;
-                if (elasticSearchConfig != null && elasticSearchConfig.length() > 0) {
-                    try {
-                        URI elasticSearchConfigURI = new URI(elasticSearchConfig);
-                        Settings.Builder settingsBuilder = Settings.builder().loadFromPath(Paths.get(elasticSearchConfigURI));
-                        settings = settingsBuilder.build().getAsMap();
-                        logger.info("Successfully loaded ElasticSearch configuration from " + elasticSearchConfigURI);
-                    } catch (URISyntaxException e) {
-                        logger.error("Error in ElasticSearch configuration URI ", e);
-                    } catch (SettingsException se) {
-                        logger.info("Error trying to load settings from " + elasticSearchConfig + ": " + se.getMessage() + " (activate debug mode for exception details)");
-                        if (logger.isDebugEnabled()) {
-                            logger.debug("Exception details", se);
-                        }
-                    }
-                }
+                logger.info("Connecting to ElasticSearch persistence backend using cluster name " + clusterName + " and index name " + indexName + "...");
 
                 address = System.getProperty(CONTEXTSERVER_ADDRESS, address);
                 port = System.getProperty(CONTEXTSERVER_PORT, port);
                 secureAddress = System.getProperty(CONTEXTSERVER_SECURE_ADDRESS, secureAddress);
                 securePort = System.getProperty(CONTEXTSERVER_SECURE_PORT, securePort);
 
+                if (karafCellarEventProducer != null && karafCellarClusterManager != null) {
+
+                    boolean setupConfigOk = true;
+                    Group group = karafCellarGroupManager.findGroupByName(karafCellarGroupName);
+                    if (setupConfigOk && group == null) {
+                        logger.error("Cluster group " + karafCellarGroupName + " doesn't exist");
+                        setupConfigOk = false;
+                    }
+
+                    // check if the producer is ON
+                    if (setupConfigOk && karafCellarEventProducer.getSwitch().getStatus().equals(SwitchStatus.OFF)) {
+                        logger.error("Cluster event producer is OFF");
+                        setupConfigOk = false;
+                    }
+
+                    // check if the config pid is allowed
+                    if (setupConfigOk && !isClusterConfigPIDAllowed(group, Constants.CATEGORY, KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION, EventType.OUTBOUND)) {
+                        logger.error("Configuration PID " + KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION + " is blocked outbound for cluster group " + karafCellarGroupName);
+                        setupConfigOk = false;
+                    }
+
+                    if (setupConfigOk) {
+                        Map<String, Properties> configurations = karafCellarClusterManager.getMap(Constants.CONFIGURATION_MAP + Configurations.SEPARATOR + karafCellarGroupName);
+                        org.apache.karaf.cellar.core.Node thisKarafNode = karafCellarClusterManager.getNode();
+                        Properties karafCellarClusterNodeConfiguration = configurations.get(KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION);
+                        if (karafCellarClusterNodeConfiguration == null) {
+                            karafCellarClusterNodeConfiguration = new Properties();
+                        }
+                        String publicEndpointsPropValue = karafCellarClusterNodeConfiguration.getProperty(KARAF_CLUSTER_CONFIGURATION_PUBLIC_ENDPOINTS, thisKarafNode.getId() + "=" + address + ":" + port);
+                        String secureEndpointsPropValue = karafCellarClusterNodeConfiguration.getProperty(KARAF_CLUSTER_CONFIGURATION_SECURE_ENDPOINTS, thisKarafNode.getId() + "=" + secureAddress + ":" + securePort);
+                        String[] publicEndpointsArray = publicEndpointsPropValue.split(",");
+                        Set<String> publicEndpoints = new TreeSet<String>(Arrays.asList(publicEndpointsArray));
+                        String[] secureEndpointsArray = secureEndpointsPropValue.split(",");
+                        Set<String> secureEndpoints = new TreeSet<String>(Arrays.asList(secureEndpointsArray));
+                        publicEndpoints.add(thisKarafNode.getId() + "=" + address + ":" + port);
+                        secureEndpoints.add(thisKarafNode.getId() + "=" + secureAddress + ":" + port);
+                        karafCellarClusterNodeConfiguration.setProperty(KARAF_CLUSTER_CONFIGURATION_PUBLIC_ENDPOINTS, StringUtils.join(publicEndpoints, ","));
+                        karafCellarClusterNodeConfiguration.setProperty(KARAF_CLUSTER_CONFIGURATION_SECURE_ENDPOINTS, StringUtils.join(secureEndpoints, ","));
+                        configurations.put(KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION, karafCellarClusterNodeConfiguration);
+                        ClusterConfigurationEvent clusterConfigurationEvent = new ClusterConfigurationEvent(KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION);
+                        clusterConfigurationEvent.setSourceGroup(group);
+                        karafCellarEventProducer.produce(clusterConfigurationEvent);
+                    }
+                }
+
                 bulkProcessorName = System.getProperty(BULK_PROCESSOR_NAME, bulkProcessorName);
                 bulkProcessorConcurrentRequests = System.getProperty(BULK_PROCESSOR_CONCURRENT_REQUESTS, bulkProcessorConcurrentRequests);
                 bulkProcessorBulkActions = System.getProperty(BULK_PROCESSOR_BULK_ACTIONS, bulkProcessorBulkActions);
@@ -324,57 +358,13 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                 bulkProcessorFlushInterval = System.getProperty(BULK_PROCESSOR_FLUSH_INTERVAL, bulkProcessorFlushInterval);
                 bulkProcessorBackoffPolicy = System.getProperty(BULK_PROCESSOR_BACKOFF_POLICY, bulkProcessorBackoffPolicy);
 
-                Settings.Builder settingsBuilder = Settings.builder();
-                if (settings != null) {
-                    settingsBuilder.put(settings);
-                }
-
-                String karafHome = System.getProperty(KARAF_HOME);
-                File pluginsFile = new File(getConfig(settings, PATH_PLUGINS, new File(new File(karafHome), ELASTICSEARCH_PLUGINS_DIRECTORY).getAbsolutePath()));
-                File homeFile = new File(getConfig(settings, PATH_HOME, new File(new File(karafHome), ELASTICSEARCH_HOME_DIRECTORY).getAbsolutePath()));
-                File dataFile = new File(getConfig(settings, PATH_DATA, new File(new File(karafHome), ELASTICSEARCH_DATA_DIRECTORY).getAbsolutePath()));
-
-                // allow dots in mappings (re-introduced in ElasticSearch 2.4.0)
-                System.setProperty(MAPPER_ALLOW_DOTS_IN_NAME, "true");
-
-                settingsBuilder.put(CLUSTER_NAME, clusterName)
-                        .put(NODE_DATA, nodeData)
-                        .put(PATH_DATA, dataFile.getAbsolutePath())
-                        .put(PATH_HOME, homeFile.getAbsolutePath())
-                        .put(PATH_PLUGINS, pluginsFile.getAbsolutePath())
-                        .put(DISCOVERY_ZEN_PING_MULTICAST_ENABLED, discoveryEnabled)
-                        .put(INDEX_NUMBER_OF_REPLICAS, numberOfReplicas)
-                        .put(INDEX_NUMBER_OF_SHARDS, numberOfShards)
-                        .put(NODE_CONTEXTSERVER_ADDRESS, address)
-                        .put(NODE_CONTEXTSERVER_PORT, port)
-                        .put(NODE_CONTEXTSERVER_SECURE_ADDRESS, secureAddress)
-                        .put(NODE_CONTEXTSERVER_SECURE_PORT, securePort)
-                        .put(INDEX_MAX_RESULT_WINDOW, "2147483647");
-
-                if (settingsBuilder.get(ELASTICSEARCH_NETWORK_HOST) == null) {
-                    logger.info("Setting ElasticSearch network host address to {}", address);
-                    settingsBuilder.put(ELASTICSEARCH_NETWORK_HOST, address);
-                }
-
-                node = nodeBuilder().settings(settingsBuilder).node();
-                nodeClient = node.client();
-
-                logger.info("Waiting for ElasticSearch to start...");
-
-                nodeClient.admin().cluster().prepareHealth()
-                        .setWaitForGreenStatus()
-                        .get();
-
-                logger.info("Cluster status is GREEN");
-
                 try {
-                    Settings transportSettings = Settings.settingsBuilder()
+                    Settings transportSettings = Settings.builder()
                             .put(CLUSTER_NAME, clusterName).build();
-                    client = TransportClient.builder().settings(transportSettings).build()
+                    client = new PreBuiltTransportClient(transportSettings)
                             .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(address), 9300));
                 } catch (UnknownHostException e) {
                     logger.error("Error resolving address " + address + " ElasticSearch transport client not connected, using internal client instead", e);
-                    client = nodeClient;
                 }
 
                 // @todo is there a better way to detect index existence than to wait for it to startup ?
@@ -412,7 +402,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                 client.admin().indices().preparePutTemplate(indexName + "_monthlyindex")
                         .setTemplate(indexName + "-*")
                         .setOrder(1)
-                        .setSettings(Settings.settingsBuilder()
+                        .setSettings(Settings.builder()
                                 .put(NUMBER_OF_SHARDS, Integer.parseInt(monthlyIndexNumberOfShards))
                                 .put(NUMBER_OF_REPLICAS, Integer.parseInt(monthlyIndexNumberOfReplicas))
                                 .build()).execute().actionGet();
@@ -582,11 +572,9 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                         logger.error("Error waiting for bulk operations to flush !", e);
                     }
                 }
-                if (nodeClient != client) {
+                if (client != null) {
                     client.close();
                 }
-                nodeClient.close();
-                node.close();
                 return null;
             }
         }.executeInClassLoader();
@@ -711,7 +699,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                     String itemType = (String) clazz.getField("ITEM_TYPE").get(null);
 
                     if (itemsMonthlyIndexed.contains(itemType) && dateHint == null) {
-                        PartialList<T> r = query(QueryBuilders.idsQuery(itemType).ids(itemId), null, clazz, 0, 1, null);
+                        PartialList<T> r = query(QueryBuilders.idsQuery(itemType).addIds(itemId), null, clazz, 0, 1, null);
                         if (r.size() > 0) {
                             return r.get(0);
                         }
@@ -886,11 +874,39 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                 try {
                     String itemType = (String) clazz.getField("ITEM_TYPE").get(null);
 
-                    DeleteByQueryResponse rsp = new DeleteByQueryRequestBuilder(client, DeleteByQueryAction.INSTANCE)
+                    BulkRequestBuilder deleteByScope = client.prepareBulk();
+
+                    final TimeValue keepAlive = TimeValue.timeValueHours(1);
+                    SearchResponse response = client.prepareSearch(indexName + "*")
                             .setIndices(getIndexNameForQuery(itemType))
+                            .setScroll(keepAlive)
                             .setQuery(conditionESQueryBuilderDispatcher.getQueryBuilder(query))
-                            .execute()
-                            .actionGet();
+                            .setSize(100).execute().actionGet();
+
+                    // Scroll until no more hits are returned
+                    while (true) {
+
+                        for (SearchHit hit : response.getHits().getHits()) {
+                            // add hit to bulk delete
+                            deleteByScope.add(Requests.deleteRequest(hit.index()).type(hit.type()).id(hit.id()));
+                        }
+
+                        response = client.prepareSearchScroll(response.getScrollId()).setScroll(keepAlive).execute().actionGet();
+
+                        // If we have no more hits, exit
+                        if (response.getHits().getHits().length == 0) {
+                            break;
+                        }
+                    }
+
+                    // we're done with the scrolling, delete now
+                    if (deleteByScope.numberOfActions() > 0) {
+                        final BulkResponse deleteResponse = deleteByScope.get();
+                        if (deleteResponse.hasFailures()) {
+                            // do something
+                            logger.debug("Couldn't remove by query " + query + ":\n{}", deleteResponse.buildFailureMessage());
+                        }
+                    }
 
                     return true;
                 } catch (Exception e) {
@@ -995,7 +1011,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                 ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getMappingsResponse.getMappings();
                 Map<String, Map<String, Object>> propertyMap = new HashMap<>();
                 try {
-                    UnmodifiableIterator<ImmutableOpenMap<String, MappingMetaData>> it = mappings.valuesIt();
+                    Iterator<ImmutableOpenMap<String, MappingMetaData>> it = mappings.valuesIt();
                     while (it.hasNext()) {
                         ImmutableOpenMap<String, MappingMetaData> next = it.next();
                         Map<String, Map<String, Object>> properties = (Map<String, Map<String, Object>>) next.get(itemType).getSourceAsMap().get("properties");
@@ -1030,7 +1046,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                     logger.info("Saving query : " + queryName);
                     client.prepareIndex(indexName, ".percolator", queryName)
                             .setSource(query)
-                            .setRefresh(true) // Needed when the query shall be available immediately
+                            .setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
                             .execute().actionGet();
                     return true;
                 } catch (Exception e) {
@@ -1057,7 +1073,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                 //Index the query = register it in the percolator
                 try {
                     client.prepareDelete(indexName, ".percolator", queryName)
-                            .setRefresh(true) // Needed when the query shall be available immediately
+                            .setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
                             .execute().actionGet();
                     return true;
                 } catch (Exception e) {
@@ -1069,36 +1085,6 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
     }
 
     @Override
-    public List<String> getMatchingSavedQueries(final Item item) {
-        return new InClassLoaderExecute<List<String>>() {
-            protected List<String> execute(Object... args) {
-                List<String> matchingQueries = new ArrayList<String>();
-                try {
-                    String source = CustomObjectMapper.getObjectMapper().writeValueAsString(item);
-
-                    String itemType = item.getItemType();
-
-                    //Percolate
-                    PercolateResponse response = client.preparePercolate()
-                            .setIndices(indexName)
-                            .setDocumentType(itemType)
-                            .setSource("{doc:" + source + "}").execute().actionGet();
-                    //Iterate over the results
-                    for (PercolateResponse.Match match : response) {
-                        //Handle the result which is the name of
-                        //the query in the percolator
-                        matchingQueries.add(match.getId().string());
-                    }
-                } catch (IOException e) {
-                    logger.error("Error getting matching saved queries for item=" + item, e);
-                }
-                return matchingQueries;
-            }
-        }.executeInClassLoader();
-
-    }
-
-    @Override
     public boolean testMatch(Condition query, Item item) {
         try {
             return conditionEvaluatorDispatcher.eval(query, item);
@@ -1109,9 +1095,9 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
             final Class<? extends Item> clazz = item.getClass();
             String itemType = (String) clazz.getField("ITEM_TYPE").get(null);
 
-            QueryBuilder builder = QueryBuilders.andQuery(
-                    QueryBuilders.idsQuery(itemType).ids(item.getItemId()),
-                    conditionESQueryBuilderDispatcher.buildFilter(query));
+            QueryBuilder builder = QueryBuilders.boolQuery()
+                    .must(QueryBuilders.idsQuery(itemType).addIds(item.getItemId()))
+                    .must(conditionESQueryBuilderDispatcher.buildFilter(query));
             return queryCount(builder, itemType) > 0;
         } catch (IllegalAccessException e) {
             logger.error("Error getting query for item=" + item, e);
@@ -1181,9 +1167,9 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
             protected Long execute(Object... args) {
                 SearchResponse response = client.prepareSearch(getIndexNameForQuery(itemType))
                         .setTypes(itemType)
-                        .setSearchType(SearchType.COUNT)
+                        .setSize(0)
                         .setQuery(QueryBuilders.matchAllQuery())
-                        .addAggregation(AggregationBuilders.filter("filter").filter(filter))
+                        .addAggregation(AggregationBuilders.filter("filter", filter))
                         .execute()
                         .actionGet();
                 Aggregations searchHits = response.getAggregations();
@@ -1213,7 +1199,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                     } else if (size != -1) {
                         requestBuilder.setSize(size);
                     } else {
-                        requestBuilder.setSize(Integer.MAX_VALUE);
+                        // requestBuilder.setSize(Integer.MAX_VALUE);
                     }
                     if (routing != null) {
                         requestBuilder.setRouting(routing);
@@ -1223,7 +1209,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                         for (String sortByElement : sortByArray) {
                             if (sortByElement.startsWith("geo:")) {
                                 String[] elements = sortByElement.split(":");
-                                GeoDistanceSortBuilder distanceSortBuilder = SortBuilders.geoDistanceSort(elements[1]).point(Double.parseDouble(elements[2]), Double.parseDouble(elements[3])).unit(DistanceUnit.KILOMETERS);
+                                GeoDistanceSortBuilder distanceSortBuilder = SortBuilders.geoDistanceSort(elements[1], Double.parseDouble(elements[2]), Double.parseDouble(elements[3])).unit(DistanceUnit.KILOMETERS);
                                 if (elements.length > 4 && elements[4].equals("desc")) {
                                     requestBuilder = requestBuilder.addSort(distanceSortBuilder.order(SortOrder.DESC));
                                 } else {
@@ -1270,7 +1256,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
 
                 SearchRequestBuilder builder = client.prepareSearch(getIndexNameForQuery(itemType))
                         .setTypes(itemType)
-                        .setSearchType(SearchType.COUNT)
+                        .setSize(0)
                         .setQuery(QueryBuilders.matchAllQuery());
 
                 List<AggregationBuilder> lastAggregation = new ArrayList<AggregationBuilder>();
@@ -1279,13 +1265,13 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                     AggregationBuilder bucketsAggregation = null;
                     if (aggregate instanceof DateAggregate) {
                         DateAggregate dateAggregate = (DateAggregate) aggregate;
-                        DateHistogramBuilder dateHistogramBuilder = AggregationBuilders.dateHistogram("buckets").field(aggregate.getField()).interval(new DateHistogramInterval((dateAggregate.getInterval())));
+                        DateHistogramAggregationBuilder dateHistogramBuilder = AggregationBuilders.dateHistogram("buckets").field(aggregate.getField()).dateHistogramInterval(new DateHistogramInterval((dateAggregate.getInterval())));
                         if (dateAggregate.getFormat() != null) {
                             dateHistogramBuilder.format(dateAggregate.getFormat());
                         }
                         bucketsAggregation = dateHistogramBuilder;
                     } else if (aggregate instanceof NumericRangeAggregate) {
-                        RangeBuilder rangebuilder = AggregationBuilders.range("buckets").field(aggregate.getField());
+                        RangeAggregationBuilder rangebuilder = AggregationBuilders.range("buckets").field(aggregate.getField());
                         for (NumericRange range : ((NumericRangeAggregate) aggregate).getRanges()) {
                             if (range != null) {
                                 if (range.getFrom() != null && range.getTo() != null) {
@@ -1300,19 +1286,19 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                         bucketsAggregation = rangebuilder;
                     } else if (aggregate instanceof DateRangeAggregate) {
                         DateRangeAggregate dateRangeAggregate = (DateRangeAggregate) aggregate;
-                        DateRangeBuilder rangebuilder = AggregationBuilders.dateRange("buckets").field(aggregate.getField());
+                        DateRangeAggregationBuilder rangebuilder = AggregationBuilders.dateRange("buckets").field(aggregate.getField());
                         if (dateRangeAggregate.getFormat() != null) {
                             rangebuilder.format(dateRangeAggregate.getFormat());
                         }
                         for (DateRange range : dateRangeAggregate.getDateRanges()) {
                             if (range != null) {
-                                rangebuilder.addRange(range.getKey(), range.getFrom(), range.getTo());
+                                rangebuilder.addRange(range.getKey(), range.getFrom().toString(), range.getTo().toString());
                             }
                         }
                         bucketsAggregation = rangebuilder;
                     } else if (aggregate instanceof IpRangeAggregate) {
                         IpRangeAggregate ipRangeAggregate = (IpRangeAggregate) aggregate;
-                        IPv4RangeBuilder rangebuilder = AggregationBuilders.ipRange("buckets").field(aggregate.getField());
+                        IpRangeAggregationBuilder rangebuilder = AggregationBuilders.ipRange("buckets").field(aggregate.getField());
                         for (IpRange range : ipRangeAggregate.getRanges()) {
                             if (range != null) {
                                 rangebuilder.addRange(range.getKey(), range.getFrom(), range.getTo());
@@ -1321,10 +1307,10 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                         bucketsAggregation = rangebuilder;
                     } else {
                         //default
-                        bucketsAggregation = AggregationBuilders.terms("buckets").field(aggregate.getField()).size(Integer.MAX_VALUE);
+                        bucketsAggregation = AggregationBuilders.terms("buckets").field(aggregate.getField()).size(5000);
                     }
                     if (bucketsAggregation != null) {
-                        final MissingBuilder missingBucketsAggregation = AggregationBuilders.missing("missing").field(aggregate.getField());
+                        final MissingAggregationBuilder missingBucketsAggregation = AggregationBuilders.missing("missing").field(aggregate.getField());
                         for (AggregationBuilder aggregationBuilder : lastAggregation) {
                             bucketsAggregation.subAggregation(aggregationBuilder);
                             missingBucketsAggregation.subAggregation(aggregationBuilder);
@@ -1334,7 +1320,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                 }
 
                 if (filter != null) {
-                    AggregationBuilder filterAggregation = AggregationBuilders.filter("filter").filter(conditionESQueryBuilderDispatcher.buildFilter(filter));
+                    AggregationBuilder filterAggregation = AggregationBuilders.filter("filter", conditionESQueryBuilderDispatcher.buildFilter(filter));
                     for (AggregationBuilder aggregationBuilder : lastAggregation) {
                         filterAggregation.subAggregation(aggregationBuilder);
                     }
@@ -1408,47 +1394,87 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
             protected List<ClusterNode> execute(Object... args) {
                 Map<String, ClusterNode> clusterNodes = new LinkedHashMap<String, ClusterNode>();
 
-                NodesInfoResponse nodesInfoResponse = client.admin().cluster().prepareNodesInfo(NodesInfoRequest.ALL_NODES)
-                        .setSettings(true)
-                        .execute()
-                        .actionGet();
-                NodeInfo[] nodesInfoArray = nodesInfoResponse.getNodes();
-                for (NodeInfo nodeInfo : nodesInfoArray) {
-                    if (nodeInfo.getSettings().get("node.contextserver.address") != null) {
-                        ClusterNode clusterNode = new ClusterNode();
-                        clusterNode.setHostName(nodeInfo.getHostname());
-                        clusterNode.setHostAddress(nodeInfo.getSettings().get("node.contextserver.address"));
-                        clusterNode.setPublicPort(Integer.parseInt(nodeInfo.getSettings().get("node.contextserver.port")));
-                        clusterNode.setSecureHostAddress(nodeInfo.getSettings().get("node.contextserver.secureAddress"));
-                        clusterNode.setSecurePort(Integer.parseInt(nodeInfo.getSettings().get("node.contextserver.securePort")));
-                        clusterNode.setMaster(nodeInfo.getNode().isMasterNode());
-                        clusterNode.setData(nodeInfo.getNode().isDataNode());
-                        clusterNodes.put(nodeInfo.getNode().getId(), clusterNode);
+                Set<org.apache.karaf.cellar.core.Node> karafCellarNodes = karafCellarClusterManager.listNodes();
+                org.apache.karaf.cellar.core.Node thisKarafNode = karafCellarClusterManager.getNode();
+                Map<String, Properties> clusterConfigurations = karafCellarClusterManager.getMap(Constants.CONFIGURATION_MAP + Configurations.SEPARATOR + karafCellarGroupName);
+                Properties karafCellarClusterNodeConfiguration = clusterConfigurations.get(KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION);
+                Map<String, String> publicNodeEndpoints = new TreeMap<>();
+                Map<String, String> secureNodeEndpoints = new TreeMap<>();
+                if (karafCellarClusterNodeConfiguration != null) {
+                    String publicEndpointsPropValue = karafCellarClusterNodeConfiguration.getProperty(KARAF_CLUSTER_CONFIGURATION_PUBLIC_ENDPOINTS, thisKarafNode.getId() + "=" + address + ":" + port);
+                    String secureEndpointsPropValue = karafCellarClusterNodeConfiguration.getProperty(KARAF_CLUSTER_CONFIGURATION_SECURE_ENDPOINTS, thisKarafNode.getId() + "=" + secureAddress + ":" + securePort);
+                    String[] publicEndpointsArray = publicEndpointsPropValue.split(",");
+                    Set<String> publicEndpoints = new TreeSet<String>(Arrays.asList(publicEndpointsArray));
+                    for (String endpoint : publicEndpoints) {
+                        String[] endpointParts = endpoint.split("=");
+                        publicNodeEndpoints.put(endpointParts[0], endpointParts[1]);
+                    }
+                    String[] secureEndpointsArray = secureEndpointsPropValue.split(",");
+                    Set<String> secureEndpoints = new TreeSet<String>(Arrays.asList(secureEndpointsArray));
+                    for (String endpoint : secureEndpoints) {
+                        String[] endpointParts = endpoint.split("=");
+                        secureNodeEndpoints.put(endpointParts[0], endpointParts[1]);
                     }
                 }
-
-                NodesStatsResponse nodesStatsResponse = client.admin().cluster().prepareNodesStats(NodesInfoRequest.ALL_NODES)
-                        .setOs(true)
-                        .setJvm(true)
-                        .setProcess(true)
-                        .execute()
-                        .actionGet();
-                NodeStats[] nodeStatsArray = nodesStatsResponse.getNodes();
-                for (NodeStats nodeStats : nodeStatsArray) {
-                    ClusterNode clusterNode = clusterNodes.get(nodeStats.getNode().getId());
-                    if (clusterNode != null) {
-                        // the following may be null in the case where Sigar didn't initialize properly, for example
-                        // because the native libraries were not installed or if we redeployed the OSGi bundle in which
-                        // case Sigar cannot initialize properly since it tries to reload the native libraries, generates
-                        // an error and doesn't initialize properly.
-                        if (nodeStats.getProcess() != null && nodeStats.getProcess().getCpu() != null) {
-                            clusterNode.setCpuLoad(nodeStats.getProcess().getCpu().getPercent());
+                for (org.apache.karaf.cellar.core.Node karafCellarNode : karafCellarNodes) {
+                    ClusterNode clusterNode = new ClusterNode();
+                    clusterNode.setHostName(karafCellarNode.getHost());
+                    String publicEndpoint = publicNodeEndpoints.get(karafCellarNode.getId());
+                    String[] publicEndpointParts = publicEndpoint.split(":");
+                    clusterNode.setHostAddress(publicEndpointParts[0]);
+                    clusterNode.setPublicPort(Integer.parseInt(publicEndpointParts[1]));
+                    String secureEndpoint = secureNodeEndpoints.get(karafCellarNode.getId());
+                    String[] secureEndpointParts = secureEndpoint.split(":");
+                    clusterNode.setSecureHostAddress(secureEndpointParts[0]);
+                    clusterNode.setSecurePort(Integer.parseInt(secureEndpointParts[1]));
+                    clusterNode.setMaster(false);
+                    clusterNode.setData(false);
+                    try {
+                        // now let's connect to remote JMX service to retrieve information from the runtime and operating system MX beans
+                        JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+karafCellarNode.getHost() + ":"+karafJMXPort+"/karaf-root");
+                        Map<String,Object> environment=new HashMap<String,Object>();
+                        if (karafJMXUsername != null && karafJMXPassword != null) {
+                            environment.put(JMXConnector.CREDENTIALS,new String[]{karafJMXUsername,karafJMXPassword});
                         }
-                        if (nodeStats.getOs() != null) {
-                            clusterNode.setLoadAverage(new double[] { nodeStats.getOs().getLoadAverage() });
-                            clusterNode.setUptime(nodeStats.getJvm().getUptime().getMillis());
+                        JMXConnector jmxc = JMXConnectorFactory.connect(url, environment);
+                        MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
+                        final RuntimeMXBean remoteRuntime = ManagementFactory.newPlatformMXBeanProxy(mbsc, ManagementFactory.RUNTIME_MXBEAN_NAME, RuntimeMXBean.class);
+                        clusterNode.setUptime(remoteRuntime.getUptime());
+                        ObjectName operatingSystemMXBeanName = new ObjectName(ManagementFactory.OPERATING_SYSTEM_MXBEAN_NAME);
+                        Double processCpuLoad = null;
+                        Double systemCpuLoad = null;
+                        try {
+                            processCpuLoad = (Double) mbsc.getAttribute(operatingSystemMXBeanName, "ProcessCpuLoad");
+                        } catch (MBeanException e) {
+                            e.printStackTrace();
+                        } catch (AttributeNotFoundException e) {
+                            e.printStackTrace();
+                        }
+                        try {
+                            systemCpuLoad = (Double) mbsc.getAttribute(operatingSystemMXBeanName, "SystemCpuLoad");
+                        } catch (MBeanException e) {
+                            e.printStackTrace();
+                        } catch (AttributeNotFoundException e) {
+                            e.printStackTrace();
                         }
+                        final OperatingSystemMXBean remoteOperatingSystemMXBean = ManagementFactory.newPlatformMXBeanProxy(mbsc, ManagementFactory.OPERATING_SYSTEM_MXBEAN_NAME, OperatingSystemMXBean.class);
+                        clusterNode.setLoadAverage(new double[] { remoteOperatingSystemMXBean.getSystemLoadAverage()});
+                        if (systemCpuLoad != null) {
+                            clusterNode.setCpuLoad(systemCpuLoad);
+                        }
+
+                    } catch (MalformedURLException e) {
+                        logger.error("Error connecting to remote JMX server", e);
+                    } catch (IOException e) {
+                        logger.error("Error retrieving remote JMX data", e);
+                    } catch (MalformedObjectNameException e) {
+                        logger.error("Error retrieving remote JMX data", e);
+                    } catch (InstanceNotFoundException e) {
+                        logger.error("Error retrieving remote JMX data", e);
+                    } catch (ReflectionException e) {
+                        logger.error("Error retrieving remote JMX data", e);
                     }
+                    clusterNodes.put(karafCellarNode.getId(), clusterNode);
                 }
 
                 return new ArrayList<ClusterNode>(clusterNodes.values());
@@ -1486,7 +1512,6 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                         .setFlush(false)
                         .setCompletion(false)
                         .setRefresh(false)
-                        .setSuggest(false)
                         .execute()
                         .actionGet();
 
@@ -1525,7 +1550,6 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
 
                 final TimeValue keepAlive = TimeValue.timeValueHours(1);
                 SearchResponse response = client.prepareSearch(indexName + "*")
-                        .setSearchType(SearchType.SCAN)
                         .setScroll(keepAlive)
                         .setQuery(query)
                         .setSize(100).execute().actionGet();
@@ -1570,9 +1594,9 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
 
                 SearchRequestBuilder builder = client.prepareSearch(getIndexNameForQuery(itemType))
                         .setTypes(itemType)
-                        .setSearchType(SearchType.COUNT)
+                        .setSize(0)
                         .setQuery(QueryBuilders.matchAllQuery());
-                AggregationBuilder filterAggregation = AggregationBuilders.filter("metrics").filter(conditionESQueryBuilderDispatcher.buildFilter(condition));
+                AggregationBuilder filterAggregation = AggregationBuilders.filter("metrics", conditionESQueryBuilderDispatcher.buildFilter(condition));
 
                 if (metrics != null) {
                     for (String metric : metrics) {
@@ -1638,4 +1662,22 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
         }
         return defaultValue;
     }
+
+    /**
+     * Check if a configuration is allowed.
+     *
+     * @param group the cluster group.
+     * @param category the configuration category constant.
+     * @param pid the configuration PID.
+     * @param type the cluster event type.
+     * @return true if the cluster event type is allowed, false else.
+     */
+    public boolean isClusterConfigPIDAllowed(Group group, String category, String pid, EventType type) {
+        CellarSupport support = new CellarSupport();
+        support.setClusterManager(this.karafCellarClusterManager);
+        support.setGroupManager(this.karafCellarGroupManager);
+        support.setConfigurationAdmin(this.osgiConfigurationAdmin);
+        return support.isAllowed(group, category, pid, type);
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/actionType.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/actionType.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/actionType.json
index 9470350..fa2f0ea 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/actionType.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/actionType.json
@@ -4,9 +4,9 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/campaign.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/campaign.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/campaign.json
index 36788d7..efdcb3c 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/campaign.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/campaign.json
@@ -4,9 +4,9 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
@@ -17,8 +17,7 @@
         "type": "double"
       },
       "currency": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "startDate": {
         "type": "date",
@@ -29,25 +28,21 @@
         "format": "strict_date_optional_time||epoch_millis"
       },
       "itemId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "primaryGoal": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "timezone": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "metadata": {
         "properties": {
           "description": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           },
           "enabled": {
@@ -57,25 +52,22 @@
             "type": "boolean"
           },
           "id": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "missingPlugins": {
             "type": "boolean"
           },
           "name": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "readOnly": {
             "type": "boolean"
           },
           "scope": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "tags": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/campaignevent.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/campaignevent.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/campaignevent.json
index ccc001e..f682e6a 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/campaignevent.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/campaignevent.json
@@ -4,9 +4,9 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
@@ -14,36 +14,31 @@
     ],
     "properties": {
       "campaignId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "cost": {
         "type": "double"
       },
       "currency": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "eventDate": {
         "type": "date",
         "format": "strict_date_optional_time||epoch_millis"
       },
       "itemId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "timezone": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "metadata": {
         "properties": {
           "description": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           },
           "enabled": {
@@ -53,22 +48,19 @@
             "type": "boolean"
           },
           "id": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "missingPlugins": {
             "type": "boolean"
           },
           "name": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "readOnly": {
             "type": "boolean"
           },
           "scope": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/conditionType.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/conditionType.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/conditionType.json
index 73ecac9..702a9f1 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/conditionType.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/conditionType.json
@@ -4,13 +4,73 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
       }
-    ]
+    ],
+    "properties" : {
+      "conditionEvaluator" : {
+        "type" : "keyword"
+      },
+      "itemId" : {
+        "type" : "keyword"
+      },
+      "itemType" : {
+        "type" : "keyword"
+      },
+      "metadata" : {
+        "properties" : {
+          "description" : {
+            "type" : "text",
+            "analyzer" : "folding"
+          },
+          "enabled" : {
+            "type" : "boolean"
+          },
+          "hidden" : {
+            "type" : "boolean"
+          },
+          "id" : {
+            "type" : "keyword"
+          },
+          "missingPlugins" : {
+            "type" : "boolean"
+          },
+          "name" : {
+            "type" : "keyword"
+          },
+          "readOnly" : {
+            "type" : "boolean"
+          },
+          "tags" : {
+            "type" : "text",
+            "analyzer" : "folding"
+          }
+        }
+      },
+      "parameters" : {
+        "properties" : {
+          "defaultValue" : {
+            "type" : "keyword"
+          },
+          "id" : {
+            "type" : "keyword"
+          },
+          "multivalued" : {
+            "type" : "boolean"
+          },
+          "type" : {
+            "type" : "keyword"
+          }
+        }
+      },
+      "queryBuilder" : {
+        "type" : "keyword"
+      }
+    }
   }
 }
\ No newline at end of file


[3/4] incubator-unomi git commit: UNOMI 70 - Upgrade to ElasticSearch 5.0 - Upgrade to ElasticSearch 5.0.1 - Upgrade CXF to 3.0.2 - Upgrade to Karaf 3.0.8 - Replace Unomi clustering from ES clustering to Karaf Cellar clustering

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/event.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/event.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/event.json
index 6089499..939120d 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/event.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/event.json
@@ -4,9 +4,9 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
@@ -14,34 +14,325 @@
     ],
     "properties": {
       "eventType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "profileId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
+      },
+      "properties": {
+        "properties": {
+          "src_terms[0]": {
+            "properties": {
+              "term": {
+                "type": "keyword"
+              }
+            }
+          }
+        }
       },
       "scope": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "sessionId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "timeStamp": {
         "type": "date",
         "format": "strict_date_optional_time||epoch_millis"
+      },
+      "source": {
+        "properties": {
+          "eventType": {
+            "type": "keyword"
+          },
+          "itemId": {
+            "type": "keyword"
+          },
+          "itemType": {
+            "type": "keyword"
+          },
+          "profileId": {
+            "type": "keyword"
+          },
+          "properties": {
+            "properties": {
+              "pageInfo": {
+                "properties": {
+                  "destinationURL": {
+                    "type": "keyword"
+                  },
+                  "language": {
+                    "type": "keyword"
+                  },
+                  "pageName": {
+                    "type": "keyword"
+                  },
+                  "pagePath": {
+                    "type": "keyword"
+                  },
+                  "referringURL": {
+                    "type": "keyword"
+                  },
+                  "variant": {
+                    "type": "keyword"
+                  }
+                }
+              }
+            }
+          },
+          "scope": {
+            "type": "keyword"
+          },
+          "sessionId": {
+            "type": "keyword"
+          },
+          "source": {
+            "properties": {
+              "itemId": {
+                "type": "keyword"
+              },
+              "itemType": {
+                "type": "keyword"
+              },
+              "scope": {
+                "type": "keyword"
+              }
+            }
+          },
+          "target": {
+            "properties": {
+              "itemId": {
+                "type": "keyword"
+              },
+              "itemType": {
+                "type": "keyword"
+              },
+              "properties": {
+                "properties": {
+                  "pageInfo": {
+                    "properties": {
+                      "destinationURL": {
+                        "type": "keyword"
+                      },
+                      "language": {
+                        "type": "keyword"
+                      },
+                      "pageName": {
+                        "type": "keyword"
+                      },
+                      "pagePath": {
+                        "type": "keyword"
+                      },
+                      "referringURL": {
+                        "type": "keyword"
+                      },
+                      "variant": {
+                        "type": "keyword"
+                      }
+                    }
+                  }
+                }
+              },
+              "scope": {
+                "type": "keyword"
+              }
+            }
+          },
+          "timeStamp": {
+            "type": "date"
+          }
+        }
+      },
+      "target": {
+        "properties": {
+          "campaignId": {
+            "type": "keyword"
+          },
+          "duration": {
+            "type": "long"
+          },
+          "itemId": {
+            "type": "keyword"
+          },
+          "itemType": {
+            "type": "keyword"
+          },
+          "metadata": {
+            "properties": {
+              "enabled": {
+                "type": "boolean"
+              },
+              "hidden": {
+                "type": "boolean"
+              },
+              "id": {
+                "type": "keyword"
+              },
+              "missingPlugins": {
+                "type": "boolean"
+              },
+              "name": {
+                "type": "keyword"
+              },
+              "readOnly": {
+                "type": "boolean"
+              },
+              "scope": {
+                "type": "keyword"
+              },
+              "tags": {
+                "type": "text",
+                "analyzer": "folding",
+                "fields": {
+                  "keyword": {
+                    "type": "keyword",
+                    "ignore_above": 256
+                  }
+                }
+              }
+            }
+          },
+          "profile": {
+            "properties": {
+              "itemId": {
+                "type": "keyword"
+              },
+              "itemType": {
+                "type": "keyword"
+              },
+              "properties": {
+                "properties": {
+                  "firstVisit": {
+                    "type": "date"
+                  }
+                }
+              }
+            }
+          },
+          "profileId": {
+            "type": "keyword"
+          },
+          "properties": {
+            "properties": {
+              "birthDate": {
+                "type": "date"
+              },
+              "email": {
+                "type": "keyword"
+              },
+              "faceBookId": {
+                "type": "keyword"
+              },
+              "firstName": {
+                "type": "keyword"
+              },
+              "gender": {
+                "type": "keyword"
+              },
+              "goalId": {
+                "type": "keyword"
+              },
+              "lastName": {
+                "type": "keyword"
+              },
+              "leadAssignedTo": {
+                "type": "keyword"
+              },
+              "nationality": {
+                "type": "keyword"
+              },
+              "origin": {
+                "type": "keyword"
+              },
+              "pageInfo": {
+                "properties": {
+                  "destinationURL": {
+                    "type": "keyword"
+                  },
+                  "language": {
+                    "type": "keyword"
+                  },
+                  "pageName": {
+                    "type": "keyword"
+                  },
+                  "pagePath": {
+                    "type": "keyword"
+                  },
+                  "referringURL": {
+                    "type": "keyword"
+                  },
+                  "variant": {
+                    "type": "keyword"
+                  }
+                }
+              },
+              "path": {
+                "type": "keyword"
+              },
+              "phoneNumber": {
+                "type": "keyword"
+              },
+              "randomNumber": {
+                "type": "long"
+              },
+              "twitterId": {
+                "type": "keyword"
+              },
+              "variantId": {
+                "type": "keyword"
+              },
+              "workspace": {
+                "type": "keyword"
+              }
+            }
+          },
+          "scope": {
+            "type": "keyword"
+          },
+          "size": {
+            "type": "long"
+          },
+          "startEvent": {
+            "properties": {
+              "parameterValues": {
+                "properties": {
+                  "pagePath": {
+                    "type": "keyword"
+                  }
+                }
+              },
+              "type": {
+                "type": "keyword"
+              }
+            }
+          },
+          "targetEvent": {
+            "properties": {
+              "parameterValues": {
+                "properties": {
+                  "pagePath": {
+                    "type": "keyword"
+                  }
+                }
+              },
+              "type": {
+                "type": "keyword"
+              }
+            }
+          },
+          "timeStamp": {
+            "type": "date"
+          }
+        }
       }
     }
   }
 }
 
+

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/goal.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/goal.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/goal.json
index 0fb7bcf..7290220 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/goal.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/goal.json
@@ -4,9 +4,9 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
@@ -14,22 +14,19 @@
     ],
     "properties": {
       "campaignId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "metadata": {
         "properties": {
           "description": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "text",
+            "analyzer" : "folding"
           },
           "enabled": {
             "type": "boolean"
@@ -38,25 +35,22 @@
             "type": "boolean"
           },
           "id": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "missingPlugins": {
             "type": "boolean"
           },
           "name": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "readOnly": {
             "type": "boolean"
           },
           "scope": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "tags": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/persona.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/persona.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/persona.json
index d04715f..db9828b 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/persona.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/persona.json
@@ -4,13 +4,29 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
       }
-    ]
+    ],
+    "properties" : {
+      "properties" : {
+        "properties": {
+          "description": {
+            "type": "text",
+            "analyzer": "folding"
+          },
+          "firstName": {
+            "type": "keyword"
+          },
+          "lastName": {
+            "type": "keyword"
+          }
+        }
+      }
+    }
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/personaSession.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/personaSession.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/personaSession.json
index 6ba12aa..c54a860 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/personaSession.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/personaSession.json
@@ -4,27 +4,96 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
       }
     ],
     "properties": {
+      "duration" : {
+        "type" : "long"
+      },
+      "itemId" : {
+        "type" : "keyword"
+      },
+      "itemType" : {
+        "type" : "keyword"
+      },
       "timeStamp": {
         "type": "date"
       },
       "lastEventDate": {
         "type": "date"
       },
-      "properties": {
-        "properties": {
-          "location": {
-            "type": "geo_point"
+      "profile" : {
+        "properties" : {
+          "itemId" : {
+            "type" : "keyword"
+          },
+          "itemType" : {
+            "type" : "keyword"
+          },
+          "properties" : {
+            "properties" : {
+              "description" : {
+                "type" : "text",
+                "analyzer" : "folding"
+              },
+              "firstName" : {
+                "type" : "keyword"
+              },
+              "lastName" : {
+                "type" : "keyword"
+              }
+            }
+          }
+        }
+      },
+      "profileId" : {
+        "type" : "keyword"
+      },
+      "properties" : {
+        "properties" : {
+          "deviceCategory" : {
+            "type" : "keyword"
+          },
+          "location" : {
+            "type" : "geo_point"
+          },
+          "operatingSystemFamily" : {
+            "type" : "keyword"
+          },
+          "operatingSystemName" : {
+            "type" : "keyword"
+          },
+          "remoteAddr" : {
+            "type" : "keyword"
+          },
+          "remoteHost" : {
+            "type" : "keyword"
+          },
+          "sessionCity" : {
+            "type" : "keyword"
+          },
+          "sessionCountryCode" : {
+            "type" : "keyword"
+          },
+          "sessionCountryName" : {
+            "type" : "keyword"
+          },
+          "userAgentName" : {
+            "type" : "keyword"
+          },
+          "userAgentVersion" : {
+            "type" : "keyword"
           }
         }
+      },
+      "size" : {
+        "type" : "long"
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/profile.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/profile.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/profile.json
index 4a20426..9aba5d0 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/profile.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/profile.json
@@ -1,37 +1,53 @@
 {
   "profile": {
-    "_all": {
-      "enabled": true
-    },
     "dynamic_templates": [
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
-            "analyzer": "folding",
-            "include_in_all": true
+            "type": "text",
+            "analyzer": "folding"
           }
         }
       }
     ],
     "properties": {
       "itemId": {
-        "type": "string",
-        "analyzer": "folding",
-        "include_in_all": true
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding",
-        "include_in_all": true
+        "type": "keyword"
       },
       "properties": {
         "properties": {
+          "j:nodename": {
+            "type": "keyword"
+          },
+          "preferredLanguage": {
+            "type": "keyword"
+          },
           "firstVisit": {
             "type": "date",
             "format": "strict_date_optional_time||epoch_millis"
+          },
+          "lastVisit": {
+            "type": "date",
+            "format": "strict_date_optional_time||epoch_millis"
+          },
+          "previousVisit": {
+            "type": "date",
+            "format": "strict_date_optional_time||epoch_millis"
+          },
+          "nbOfVisits": {
+            "type": "long"
+          }
+        }
+      },
+      "systemProperties" : {
+        "properties" : {
+          "mergeIdentifier" : {
+            "type" : "keyword"
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/propertyType.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/propertyType.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/propertyType.json
index 88a958e..c03111c 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/propertyType.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/propertyType.json
@@ -4,9 +4,9 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
@@ -14,40 +14,32 @@
     ],
     "properties": {
       "automaticMappingsFrom": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "dateRanges": {
         "properties": {
           "from": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "key": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "to": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           }
         }
       },
       "defaultValue": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "mergeStrategy": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "metadata": {
         "properties": {
@@ -58,15 +50,13 @@
             "type": "boolean"
           },
           "id": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "missingPlugins": {
             "type": "boolean"
           },
           "name": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "readOnly": {
             "type": "boolean"
@@ -82,8 +72,7 @@
             "type": "double"
           },
           "key": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "to": {
             "type": "double"
@@ -97,16 +86,14 @@
         "type": "double"
       },
       "tags": {
-        "type": "string",
+        "type": "text",
         "analyzer": "folding"
       },
       "target": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "type": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/rule.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/rule.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/rule.json
index 67263cf..842181a 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/rule.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/rule.json
@@ -4,9 +4,9 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
@@ -14,17 +14,15 @@
     ],
     "properties": {
       "itemId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "metadata": {
         "properties": {
           "description": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           },
           "enabled": {
@@ -34,22 +32,19 @@
             "type": "boolean"
           },
           "id": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "missingPlugins": {
             "type": "boolean"
           },
           "name": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "readOnly": {
             "type": "boolean"
           },
           "scope": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           }
         }
       },

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/scoring.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/scoring.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/scoring.json
index b62d0a6..70b2f8d 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/scoring.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/scoring.json
@@ -4,9 +4,9 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
@@ -14,17 +14,15 @@
     ],
     "properties": {
       "itemId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "metadata": {
         "properties": {
           "description": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           },
           "enabled": {
@@ -34,26 +32,23 @@
             "type": "boolean"
           },
           "id": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "missingPlugins": {
             "type": "boolean"
           },
           "name": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "readOnly": {
             "type": "boolean"
           },
           "scope": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "tags": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "text",
+            "analyzer" : "folding"
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/segment.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/segment.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/segment.json
index c4527a5..2d25939 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/segment.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/segment.json
@@ -4,9 +4,9 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
@@ -14,17 +14,15 @@
     ],
     "properties": {
       "itemId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "metadata": {
         "properties": {
           "description": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           },
           "enabled": {
@@ -34,22 +32,19 @@
             "type": "boolean"
           },
           "id": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "missingPlugins": {
             "type": "boolean"
           },
           "name": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           },
           "readOnly": {
             "type": "boolean"
           },
           "scope": {
-            "type": "string",
-            "analyzer": "folding"
+            "type": "keyword"
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/session.json
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/session.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/session.json
index 2047b4e..b0f6215 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/session.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/session.json
@@ -4,9 +4,9 @@
       {
         "all": {
           "match": "*",
-          "match_mapping_type": "string",
+          "match_mapping_type": "text",
           "mapping": {
-            "type": "string",
+            "type": "text",
             "analyzer": "folding"
           }
         }
@@ -17,38 +17,47 @@
         "type": "long"
       },
       "itemId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "itemType": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "lastEventDate": {
         "type": "date",
         "format": "strict_date_optional_time||epoch_millis"
       },
       "profileId": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
+      },
+      "profile": {
+        "properties": {
+          "itemId": {
+            "type": "keyword"
+          },
+          "itemType": {
+            "type": "keyword"
+          }
+        }
       },
       "properties": {
         "properties": {
           "location": {
             "type": "geo_point"
+          },
+          "pageReferringURL": {
+            "type": "keyword"
+          },
+          "referringURL": {
+            "type": "keyword"
           }
         }
       },
       "scope": {
-        "type": "string",
-        "analyzer": "folding"
+        "type": "keyword"
       },
       "size": {
         "type": "long"
       },
-      "systemProperties": {
-        "type": "object"
-      },
       "timeStamp": {
         "type": "date",
         "format": "strict_date_optional_time||epoch_millis"

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/persistence-elasticsearch/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index 75039d8..23963ac 100644
--- a/persistence-elasticsearch/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/persistence-elasticsearch/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -35,10 +35,6 @@
             <cm:property name="elasticSearchConfig" value="file:${karaf.etc}/elasticsearch.yml"/>
             <cm:property name="monthlyIndex.numberOfShards" value="3"/>
             <cm:property name="monthlyIndex.numberOfReplicas" value="0"/>
-            <cm:property name="numberOfShards" value="5"/>
-            <cm:property name="numberOfReplicas" value="0"/>
-            <cm:property name="discovery.zen.ping.multicast.enabled" value="false"/>
-            <cm:property name="node.data" value="true"/>
             <cm:property name="defaultQueryLimit" value="10"/>
 
             <cm:property name="bulkProcessor.name" value="unomi-bulk" />
@@ -47,6 +43,11 @@
             <cm:property name="bulkProcessor.bulkSize" value="5MB" />
             <cm:property name="bulkProcessor.flushInterval" value="5s" />
             <cm:property name="bulkProcessor.backoffPolicy" value="exponential" />
+
+            <cm:property name="cluster.group" value="default" />
+            <cm:property name="cluster.jmxUsername" value="karaf" />
+            <cm:property name="cluster.jmxPassword" value="karaf" />
+            <cm:property name="cluster.jmxPort" value="1099" />
         </cm:default-properties>
     </cm:property-placeholder>
 
@@ -60,6 +61,11 @@
         </cm:default-properties>
     </cm:property-placeholder>
 
+    <reference id="karafCellarClusterManager" interface="org.apache.karaf.cellar.core.ClusterManager" />
+    <reference id="karafCellarEventProducer" interface="org.apache.karaf.cellar.core.event.EventProducer" />
+    <reference id="karafCellarGroupManager" interface="org.apache.karaf.cellar.core.GroupManager" />
+    <reference id="osgiConfigurationAdmin" interface="org.osgi.service.cm.ConfigurationAdmin"/>
+
     <service id="elasticSearchPersistenceService" ref="elasticSearchPersistenceServiceImpl">
         <interfaces>
             <value>org.apache.unomi.persistence.spi.PersistenceService</value>
@@ -88,10 +94,6 @@
         <property name="indexName" value="${es.index.name}"/>
         <property name="monthlyIndexNumberOfShards" value="${es.monthlyIndex.numberOfShards}"/>
         <property name="monthlyIndexNumberOfReplicas" value="${es.monthlyIndex.numberOfReplicas}"/>
-        <property name="numberOfShards" value="${es.numberOfShards}"/>
-        <property name="numberOfReplicas" value="${es.numberOfReplicas}"/>
-        <property name="nodeData" value="${es.node.data}"/>
-        <property name="discoveryEnabled" value="${es.discovery.zen.ping.multicast.enabled}"/>
         <property name="address" value="${web.contextserver.address}"/>
         <property name="port" value="${web.contextserver.port}"/>
         <property name="secureAddress" value="${web.contextserver.secureAddress}"/>
@@ -119,6 +121,14 @@
         <property name="bulkProcessorBulkSize" value="${es.bulkProcessor.bulkSize}" />
         <property name="bulkProcessorFlushInterval" value="${es.bulkProcessor.flushInterval}" />
         <property name="bulkProcessorBackoffPolicy" value="${es.bulkProcessor.backoffPolicy}" />
+        <property name="karafCellarClusterManager" ref="karafCellarClusterManager" />
+        <property name="karafCellarEventProducer" ref="karafCellarEventProducer" />
+        <property name="karafCellarGroupManager" ref="karafCellarGroupManager" />
+        <property name="karafCellarGroupName" value="${es.cluster.group}" />
+        <property name="osgiConfigurationAdmin" ref="osgiConfigurationAdmin" />
+        <property name="karafJMXUsername" value="${es.cluster.jmxUsername}" />
+        <property name="karafJMXPassword" value="${es.cluster.jmxPassword}" />
+        <property name="karafJMXPort" value="${es.cluster.jmxPort}" />
     </bean>
 
 </blueprint>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/log4j2.xml b/persistence-elasticsearch/core/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..ccafeef
--- /dev/null
+++ b/persistence-elasticsearch/core/src/main/resources/log4j2.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<Configuration status="WARN">
+    <Appenders>
+        <Console name="Console" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Root level="info">
+            <AppenderRef ref="Console"/>
+        </Root>
+    </Loggers>
+</Configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/core/src/main/resources/org.apache.unomi.persistence.elasticsearch.cfg
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/resources/org.apache.unomi.persistence.elasticsearch.cfg b/persistence-elasticsearch/core/src/main/resources/org.apache.unomi.persistence.elasticsearch.cfg
index 2b193f6..ddcbed5 100644
--- a/persistence-elasticsearch/core/src/main/resources/org.apache.unomi.persistence.elasticsearch.cfg
+++ b/persistence-elasticsearch/core/src/main/resources/org.apache.unomi.persistence.elasticsearch.cfg
@@ -35,4 +35,9 @@ bulkProcessor.concurrentRequests=1
 bulkProcessor.bulkActions=1000
 bulkProcessor.bulkSize=5MB
 bulkProcessor.flushInterval=5s
-bulkProcessor.backoffPolicy=exponential
\ No newline at end of file
+bulkProcessor.backoffPolicy=exponential
+
+cluster.group=default
+cluster.jmxUsername=karaf
+cluster.jmxPassword=karaf
+cluster.jmxPort=1099
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/plugins/security/src/main/java/org/apache/unomi/elasticsearch/plugin/security/SecurityPlugin.java
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/plugins/security/src/main/java/org/apache/unomi/elasticsearch/plugin/security/SecurityPlugin.java b/persistence-elasticsearch/plugins/security/src/main/java/org/apache/unomi/elasticsearch/plugin/security/SecurityPlugin.java
index 79fc7d3..b293527 100644
--- a/persistence-elasticsearch/plugins/security/src/main/java/org/apache/unomi/elasticsearch/plugin/security/SecurityPlugin.java
+++ b/persistence-elasticsearch/plugins/security/src/main/java/org/apache/unomi/elasticsearch/plugin/security/SecurityPlugin.java
@@ -22,9 +22,9 @@ import org.elasticsearch.common.inject.Module;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.plugins.Plugin;
 
+import java.util.ArrayList;
 import java.util.Collection;
-
-import static com.google.common.collect.Lists.newArrayList;
+import java.util.Collections;
 
 public class SecurityPlugin extends Plugin {
 
@@ -32,30 +32,22 @@ public class SecurityPlugin extends Plugin {
         super();
     }
 
-    public String name() {
-        return "contextserver-security";
-    }
-
-    public String description() {
-        return "A plugin that provides some basic security to the Context Server elasticsearch HTTP and Transport connectors";
-    }
-
     @Override
-    public Collection<Module> nodeModules() {
-        Collection<Module> modules = newArrayList();
-        // if (settings.getAsBoolean("security.enabled", true)) {
-        modules.add(new SecurityPluginModule());
-        // }
-        return modules;
+    public Collection<Module> createGuiceModules() {
+        return Collections.<Module>singletonList(new SecurityPluginModule());
     }
 
-    @SuppressWarnings("rawtypes")
     @Override
-    public Collection<Class<? extends LifecycleComponent>> nodeServices() {
-        Collection<Class<? extends LifecycleComponent>> services = newArrayList();
-        // if (settings.getAsBoolean("security.enabled", true)) {
+    @SuppressWarnings("rawtypes") // Plugin use a rawtype
+    public Collection<Class<? extends LifecycleComponent>> getGuiceServiceClasses() {
+        Collection<Class<? extends LifecycleComponent>> services = new ArrayList<>();
         services.add(SecurityPluginService.class);
-        // }
         return services;
     }
+
+    @Override
+    public Settings additionalSettings() {
+        return Settings.EMPTY;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-elasticsearch/plugins/security/src/main/java/org/apache/unomi/elasticsearch/plugin/security/SecurityPluginService.java
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/plugins/security/src/main/java/org/apache/unomi/elasticsearch/plugin/security/SecurityPluginService.java b/persistence-elasticsearch/plugins/security/src/main/java/org/apache/unomi/elasticsearch/plugin/security/SecurityPluginService.java
index 6bd73eb..7c99439 100644
--- a/persistence-elasticsearch/plugins/security/src/main/java/org/apache/unomi/elasticsearch/plugin/security/SecurityPluginService.java
+++ b/persistence-elasticsearch/plugins/security/src/main/java/org/apache/unomi/elasticsearch/plugin/security/SecurityPluginService.java
@@ -18,6 +18,7 @@
 package org.apache.unomi.elasticsearch.plugin.security;
 
 import org.elasticsearch.ElasticsearchException;
+import org.elasticsearch.client.node.NodeClient;
 import org.elasticsearch.cluster.node.DiscoveryNode;
 import org.elasticsearch.common.component.AbstractLifecycleComponent;
 import org.elasticsearch.common.inject.Inject;
@@ -37,7 +38,7 @@ import java.util.List;
 /**
  * ElasticSearch plugin that simply rejects connection from non-authorized IP ranges
  */
-public class SecurityPluginService extends AbstractLifecycleComponent<SecurityPluginService> {
+public class SecurityPluginService extends AbstractLifecycleComponent {
 
     private static final Logger logger = LoggerFactory.getLogger(SecurityPluginService.class.getName());
 
@@ -102,7 +103,7 @@ public class SecurityPluginService extends AbstractLifecycleComponent<SecurityPl
     protected void doStart() throws ElasticsearchException {
         restFilter = new RestFilter() {
             @Override
-            public void process(RestRequest request, RestChannel channel, RestFilterChain filterChain) throws Exception {
+            public void process(RestRequest request, RestChannel channel, NodeClient client, RestFilterChain filterChain) throws Exception {
                 logger.info("Processing REST request=" + request + " channel=" + channel);
                 if (request.getRemoteAddress() instanceof InetSocketAddress) {
                     InetSocketAddress inetSocketAddress = (InetSocketAddress) request.getRemoteAddress();
@@ -113,7 +114,7 @@ public class SecurityPluginService extends AbstractLifecycleComponent<SecurityPl
                 } else {
                     logger.warn("Unexpected SocketAddress that is not an InetSocketAddress (but an instance of  " + request.getRemoteAddress().getClass().getName() + "), IP range filtering is DISABLED !");
                 }
-                filterChain.continueProcessing(request, channel);
+                filterChain.continueProcessing(request, channel, client);
             }
         };
         restController.registerFilter(restFilter);

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
----------------------------------------------------------------------
diff --git a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
index 90b0efc..d81be03 100644
--- a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
+++ b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
@@ -178,14 +178,6 @@ public interface PersistenceService {
     void createMapping(String type, String source);
 
     /**
-     * TODO
-     *
-     * @param item
-     * @return
-     */
-    List<String> getMatchingSavedQueries(Item item);
-
-    /**
      * Checks whether the specified item satisfies the provided condition.
      *
      * TODO: rename to isMatching?

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/BooleanConditionESQueryBuilder.java
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/BooleanConditionESQueryBuilder.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/BooleanConditionESQueryBuilder.java
index f5330ed..94e8519 100644
--- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/BooleanConditionESQueryBuilder.java
+++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/BooleanConditionESQueryBuilder.java
@@ -23,6 +23,8 @@ import org.apache.unomi.persistence.elasticsearch.conditions.ConditionESQueryBui
 import org.elasticsearch.index.query.BoolQueryBuilder;
 import org.elasticsearch.index.query.QueryBuilder;
 import org.elasticsearch.index.query.QueryBuilders;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.List;
 import java.util.Map;
@@ -32,6 +34,8 @@ import java.util.Map;
  */
 public class BooleanConditionESQueryBuilder implements ConditionESQueryBuilder {
 
+    private static final Logger logger = LoggerFactory.getLogger(BooleanConditionESQueryBuilder.class.getName());
+
     @Override
     public QueryBuilder buildQuery(Condition condition, Map<String, Object> context,
                                    ConditionESQueryBuilderDispatcher dispatcher) {
@@ -48,9 +52,19 @@ public class BooleanConditionESQueryBuilder implements ConditionESQueryBuilder {
         BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
         for (int i = 0; i < conditionCount; i++) {
             if (isAndOperator) {
-                boolQueryBuilder.must(dispatcher.buildFilter(conditions.get(i)));
+                QueryBuilder andFilter = dispatcher.buildFilter(conditions.get(i));
+                if (andFilter != null) {
+                    boolQueryBuilder.must(andFilter);
+                } else {
+                    logger.warn("Null filter for boolean AND sub condition " + conditions.get(i));
+                }
             } else {
-                boolQueryBuilder.should(dispatcher.buildFilter(conditions.get(i)));
+                QueryBuilder orFilter = dispatcher.buildFilter(conditions.get(i));
+                if (orFilter != null) {
+                    boolQueryBuilder.should(orFilter);
+                } else {
+                    logger.warn("Null filter for boolean OR sub condition " + conditions.get(i));
+                }
             }
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/GeoLocationByPointSessionConditionESQueryBuilder.java
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/GeoLocationByPointSessionConditionESQueryBuilder.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/GeoLocationByPointSessionConditionESQueryBuilder.java
index 083cfe4..001bd3d 100644
--- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/GeoLocationByPointSessionConditionESQueryBuilder.java
+++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/GeoLocationByPointSessionConditionESQueryBuilder.java
@@ -37,8 +37,7 @@ public class GeoLocationByPointSessionConditionESQueryBuilder implements Conditi
 
             if(circleLatitude != null && circleLongitude != null && distance != null) {
                 return QueryBuilders.geoDistanceQuery("location")
-                        .lat(circleLatitude)
-                        .lon(circleLongitude)
+                        .point(circleLatitude, circleLongitude)
                         .distance(distance);
             }
         } else if("rectangle".equals(type)) {
@@ -49,8 +48,7 @@ public class GeoLocationByPointSessionConditionESQueryBuilder implements Conditi
 
             if(rectLatitudeNE != null && rectLongitudeNE != null && rectLatitudeSW != null && rectLongitudeSW != null) {
                 return QueryBuilders.geoBoundingBoxQuery("location")
-                        .topLeft(rectLatitudeNE, rectLongitudeNE)
-                        .bottomRight(rectLatitudeSW, rectLongitudeSW);
+                        .setCorners(rectLatitudeNE, rectLongitudeNE,rectLatitudeSW, rectLongitudeSW);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PropertyConditionEvaluator.java
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PropertyConditionEvaluator.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PropertyConditionEvaluator.java
index 4db6e1a..67404a8 100644
--- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PropertyConditionEvaluator.java
+++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PropertyConditionEvaluator.java
@@ -34,7 +34,7 @@ import org.apache.unomi.persistence.elasticsearch.conditions.ConditionEvaluatorD
 import org.apache.unomi.persistence.spi.PropertyHelper;
 import org.elasticsearch.ElasticsearchParseException;
 import org.elasticsearch.common.joda.DateMathParser;
-import org.elasticsearch.index.mapper.core.DateFieldMapper;
+import org.elasticsearch.index.mapper.DateFieldMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -280,7 +280,7 @@ public class PropertyConditionEvaluator implements ConditionEvaluator {
         if (value instanceof Date) {
             return ((Date) value);
         } else {
-            DateMathParser parser = new DateMathParser(DateFieldMapper.Defaults.DATE_TIME_FORMATTER);
+            DateMathParser parser = new DateMathParser(DateFieldMapper.DEFAULT_DATE_TIME_FORMATTER);
             try {
                 return new Date(parser.parse(value.toString(), new Callable<Long>() {
                     @Override

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index fd75b01..1d8b334 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,12 +63,13 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <cxf.version>2.7.11</cxf.version>
+        <cxf.version>3.0.2</cxf.version>
         <version.jackson.core>2.6.6</version.jackson.core> <!-- version used by CXF -->
         <version.jackson.jaxb>2.6.6</version.jackson.jaxb> <!-- version used by CXF -->
-        <version.karaf>3.0.2</version.karaf>
+        <version.karaf>3.0.8</version.karaf>
+        <version.karaf.cellar>3.0.3</version.karaf.cellar>
         <version.pax.exam>4.9.1</version.pax.exam>
-        <elasticsearch.version>2.4.1</elasticsearch.version>
+        <elasticsearch.version>5.0.1</elasticsearch.version>
 
         <maven.compiler.source>1.7</maven.compiler.source>
         <maven.compiler.target>1.7</maven.compiler.target>
@@ -521,11 +522,6 @@
             <!-- Apache CXF dependencies -->
             <dependency>
                 <groupId>org.apache.cxf</groupId>
-                <artifactId>cxf-rt-core</artifactId>
-                <version>${cxf.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.cxf</groupId>
                 <artifactId>cxf-rt-frontend-jaxws</artifactId>
                 <version>${cxf.version}</version>
             </dependency>
@@ -648,6 +644,25 @@
                 <type>xml</type>
                 <scope>runtime</scope>
             </dependency>
+            <dependency>
+                <groupId>org.apache.karaf.cellar</groupId>
+                <artifactId>apache-karaf-cellar</artifactId>
+                <classifier>features</classifier>
+                <version>${version.karaf.cellar}</version>
+                <type>xml</type>
+                <scope>runtime</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.karaf.cellar</groupId>
+                <artifactId>org.apache.karaf.cellar.core</artifactId>
+                <version>${version.karaf.cellar}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.karaf.cellar</groupId>
+                <artifactId>org.apache.karaf.cellar.config</artifactId>
+                <version>${version.karaf.cellar}</version>
+            </dependency>
+
             <!-- End of Apache Karaf dependencies -->
 
             <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/rest/pom.xml
----------------------------------------------------------------------
diff --git a/rest/pom.xml b/rest/pom.xml
index f795ff1..4d471a6 100644
--- a/rest/pom.xml
+++ b/rest/pom.xml
@@ -64,11 +64,6 @@
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-core</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxws</artifactId>
             <scope>provided</scope>
         </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/96a018ec/services/pom.xml
----------------------------------------------------------------------
diff --git a/services/pom.xml b/services/pom.xml
index c90ebba..7a58cd7 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -64,16 +64,6 @@
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-core</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-frontend-jaxws</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxrs</artifactId>
             <scope>provided</scope>
         </dependency>


[2/4] incubator-unomi git commit: Merge remote-tracking branch 'origin/feature-UNOMI-28-ES2X' into feature-UNOMI-70-ES5X

Posted by sh...@apache.org.
Merge remote-tracking branch 'origin/feature-UNOMI-28-ES2X' into feature-UNOMI-70-ES5X

# Conflicts:
#	api/pom.xml
#	extensions/geonames/pom.xml
#	extensions/geonames/rest/pom.xml
#	extensions/geonames/services/pom.xml
#	extensions/lists-extension/pom.xml
#	extensions/lists-extension/rest/pom.xml
#	extensions/lists-extension/services/pom.xml
#	extensions/pom.xml
#	extensions/privacy-extension/pom.xml
#	extensions/privacy-extension/rest/pom.xml
#	extensions/privacy-extension/services/pom.xml
#	itests/pom.xml
#	kar/pom.xml
#	package/pom.xml
#	performance-tests/pom.xml
#	persistence-elasticsearch/core/pom.xml
#	persistence-elasticsearch/plugins/pom.xml
#	persistence-elasticsearch/plugins/security/pom.xml
#	persistence-elasticsearch/pom.xml
#	persistence-spi/pom.xml
#	plugins/baseplugin/pom.xml
#	plugins/hover-event/pom.xml
#	plugins/mail/pom.xml
#	plugins/optimization-test/pom.xml
#	plugins/past-event/pom.xml
#	plugins/pom.xml
#	plugins/request/pom.xml
#	plugins/tracked-event/pom.xml
#	pom.xml
#	rest/pom.xml
#	samples/pom.xml
#	samples/tweet-button-plugin/pom.xml
#	services/pom.xml
#	wab/pom.xml


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/90eb893c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/90eb893c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/90eb893c

Branch: refs/heads/feature-UNOMI-70-ES5X
Commit: 90eb893c747259cb1d44a32b4c2c4e2258bc6777
Parents: ff87e2f 2263da9
Author: Serge Huber <sh...@apache.org>
Authored: Mon Dec 5 10:00:32 2016 +0100
Committer: Serge Huber <sh...@apache.org>
Committed: Mon Dec 5 10:00:32 2016 +0100

----------------------------------------------------------------------
 .../META-INF/cxs/mappings/geonameEntry.json     |   2 +-
 itests/pom.xml                                  |   5 +-
 .../java/org/apache/unomi/itests/AllTests.java  |  11 +-
 .../apache/unomi/itests/ProfileServiceTest.java |  53 +++
 kar/src/main/feature/feature.xml                |  12 +-
 package/pom.xml                                 |  53 ++-
 persistence-elasticsearch/core/pom.xml          | 202 +++------
 .../ElasticSearchPersistenceServiceImpl.java    | 423 ++++++++++++++++---
 .../conditions/ConditionContextHelper.java      |   4 +-
 .../conditions/ConditionESQueryBuilder.java     |   4 +-
 .../ConditionESQueryBuilderDispatcher.java      |  16 +-
 .../META-INF/cxs/mappings/campaign.json         |   4 +-
 .../META-INF/cxs/mappings/campaignevent.json    |   2 +-
 .../resources/META-INF/cxs/mappings/event.json  |   2 +-
 .../META-INF/cxs/mappings/profile.json          |   2 +-
 .../META-INF/cxs/mappings/session.json          |   4 +-
 .../resources/OSGI-INF/blueprint/blueprint.xml  |  13 +
 .../core/src/main/resources/elasticsearch.yml   | 381 +++--------------
 ...g.apache.unomi.persistence.elasticsearch.cfg |  10 +
 .../plugin/security/SecurityPlugin.java         |  14 +-
 .../plugin/security/SecurityPluginModule.java   |   3 +-
 .../plugin/security/SecurityPluginService.java  |   4 +-
 .../BooleanConditionESQueryBuilder.java         |  20 +-
 ...onByPointSessionConditionESQueryBuilder.java |  10 +-
 .../MatchAllConditionESQueryBuilder.java        |   8 +-
 .../conditions/NotConditionESQueryBuilder.java  |   8 +-
 .../PastEventConditionESQueryBuilder.java       |   8 +-
 .../PropertyConditionESQueryBuilder.java        |  63 +--
 .../conditions/PropertyConditionEvaluator.java  |   3 +-
 ...rceEventPropertyConditionESQueryBuilder.java |  27 +-
 .../HoverEventConditionESQueryBuilder.java      |  23 +-
 pom.xml                                         |   8 +-
 .../services/services/SegmentServiceImpl.java   |  22 +-
 33 files changed, 727 insertions(+), 697 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/90eb893c/itests/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/90eb893c/package/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/90eb893c/persistence-elasticsearch/core/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/90eb893c/pom.xml
----------------------------------------------------------------------