UNOMI-586: Optimize ES mappings by ignoring conditions and Objects that are not used for queries (#448)

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 d0ed2d3..9cfabbb 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
@@ -42,6 +42,10 @@
           "type": "boolean"
         }
       }
+    },
+    "entryCondition":  {
+      "type": "object",
+      "enabled": false
     }
   }
 }
\ No newline at end of file
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 e1ac5f8..6191913 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
@@ -16,5 +16,11 @@
         }
       }
     }
-  ]
+  ],
+  "properties": {
+    "parentCondition":  {
+      "type": "object",
+      "enabled": false
+    }
+  }
 }
\ No newline at end of file
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 3d3322b..c1f2649 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
@@ -33,6 +33,14 @@
           "type": "boolean"
         }
       }
+    },
+    "startEvent": {
+      "type": "object",
+      "enabled": false
+    },
+    "targetEvent": {
+      "type": "object",
+      "enabled": false
     }
   }
 }
\ No newline at end of file
diff --git a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/patch.json b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/patch.json
index b18dfc2..e622845 100644
--- a/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/patch.json
+++ b/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/patch.json
@@ -28,7 +28,8 @@
       "type": "text"
     },
     "data": {
-      "type": "object"
+      "type": "object",
+      "enabled": false
     },
     "lastApplication": {
       "type": "date"
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 f3fc85f..7314176 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
@@ -45,6 +45,10 @@
     },
     "raiseEventOnlyOnce": {
       "type": "boolean"
+    },
+    "condition": {
+      "type": "object",
+      "enabled": false
     }
   }
 }
\ No newline at end of file
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 dd890c7..e313cdf 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
@@ -33,6 +33,14 @@
           "type": "boolean"
         }
       }
+    },
+    "elements": {
+      "properties": {
+        "condition": {
+          "type": "object",
+          "enabled": false
+        }
+      }
     }
   }
 }