This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-spring-boot-3.21.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 17b325499a2353af28e2b2d469eebb46eccac3a8
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Mon Sep 18 16:27:56 2023 +0200

    Regen
---
 .../springboot/catalog/components/elasticsearch.json   |  5 ++++-
 .../src/main/docs/elasticsearch.json                   |  7 +++++++
 .../ElasticsearchComponentConfiguration.java           | 18 ++++++++++++++++++
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/elasticsearch.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/elasticsearch.json
index 7ebdcef5104..4cd05480ebf 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/elasticsearch.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/elasticsearch.json
@@ -23,6 +23,7 @@
   },
   "componentProperties": {
     "connectionTimeout": { "kind": "property", "displayName": "Connection 
Timeout", "group": "producer", "label": "", "required": false, "type": 
"integer", "javaType": "int", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 30000, "description": "The time in ms to wait 
before connection will timeout." },
+    "enableDocumentOnlyMode": { "kind": "property", "displayName": "Enable 
Document Only Mode", "group": "producer", "label": "", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Indicates 
whether the body of the message contains only documents. By default, it is set 
to false to be able to do the same requests as what the Document API supports 
(see https:\/\/www.elastic.co\/guide\ [...]
     "hostAddresses": { "kind": "property", "displayName": "Host Addresses", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Comma separated list with ip:port formatted 
remote transport addresses to use. The ip and port options must be left blank 
for hostAddresses to be considered instead." },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start 
Producer", "group": "producer", "label": "producer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Whether the producer 
should be started lazy (on the first message). By starting lazy you can use 
this to allow CamelContext and routes to startup in situations where a producer 
may otherwise fail during star [...]
     "maxRetryTimeout": { "kind": "property", "displayName": "Max Retry 
Timeout", "group": "producer", "label": "", "required": false, "type": 
"integer", "javaType": "int", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 30000, "description": "The time in ms before 
retry" },
@@ -46,12 +47,14 @@
     "scrollKeepAliveMs": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "Integer", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The starting index of the response.", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_SCROLL_KEEP_ALIVE_MS"
 },
     "useScroll": { "kind": "header", "displayName": "", "group": "producer", 
"label": "", "required": false, "javaType": "Boolean", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "Set 
to true to enable scroll usage", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_SCROLL" },
     "size": { "kind": "header", "displayName": "", "group": "producer", 
"label": "", "required": false, "javaType": "Integer", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
size of the response.", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_SIZE" },
-    "from": { "kind": "header", "displayName": "", "group": "producer", 
"label": "", "required": false, "javaType": "Integer", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
starting index of the response.", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_FROM" }
+    "from": { "kind": "header", "displayName": "", "group": "producer", 
"label": "", "required": false, "javaType": "Integer", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
starting index of the response.", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_FROM" },
+    "enableDocumentOnlyMode": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "Boolean", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "defaultValue": "false", "description": "Indicates whether the body of 
the message contains only documents.", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_DOCUMENT_MODE" }
   },
   "properties": {
     "clusterName": { "kind": "path", "displayName": "Cluster Name", "group": 
"producer", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "Name of the cluster" },
     "connectionTimeout": { "kind": "parameter", "displayName": "Connection 
Timeout", "group": "producer", "label": "", "required": false, "type": 
"integer", "javaType": "int", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 30000, "configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "The time in ms to wait 
before connection will timeout." },
     "disconnect": { "kind": "parameter", "displayName": "Disconnect", "group": 
"producer", "label": "", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "Disconnect after it 
finish calling the producer" },
+    "enableDocumentOnlyMode": { "kind": "parameter", "displayName": "Enable 
Document Only Mode", "group": "producer", "label": "", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "Indicates whether the 
body of the message contains only documents. By default, it  [...]
     "from": { "kind": "parameter", "displayName": "From", "group": "producer", 
"label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "Starting index of the 
response." },
     "hostAddresses": { "kind": "parameter", "displayName": "Host Addresses", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "Comma separated list 
with ip:port formatted remote transport addresses to use." },
     "indexName": { "kind": "parameter", "displayName": "Index Name", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "The name of the index to 
act against" },
diff --git 
a/components-starter/camel-elasticsearch-starter/src/main/docs/elasticsearch.json
 
b/components-starter/camel-elasticsearch-starter/src/main/docs/elasticsearch.json
index 06367aaf487..1728eba5739 100644
--- 
a/components-starter/camel-elasticsearch-starter/src/main/docs/elasticsearch.json
+++ 
b/components-starter/camel-elasticsearch-starter/src/main/docs/elasticsearch.json
@@ -44,6 +44,13 @@
       "type": "java.lang.Boolean",
       "sourceType": 
"org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties"
     },
+    {
+      "name": "camel.component.elasticsearch.enable-document-only-mode",
+      "type": "java.lang.Boolean",
+      "description": "Indicates whether the body of the message contains only 
documents. By default, it is set to false to be able to do the same requests as 
what the Document API supports (see 
https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/docs.html
 for more details). To ease the migration of routes based on the legacy 
component camel-elasticsearch-rest, you should consider enabling the mode 
especially if your routes do update operations.",
+      "sourceType": 
"org.apache.camel.component.es.springboot.ElasticsearchComponentConfiguration",
+      "defaultValue": false
+    },
     {
       "name": "camel.component.elasticsearch.enable-s-s-l",
       "type": "java.lang.Boolean",
diff --git 
a/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/es/springboot/ElasticsearchComponentConfiguration.java
 
b/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/es/springboot/ElasticsearchComponentConfiguration.java
index 91e24831003..9253e529157 100644
--- 
a/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/es/springboot/ElasticsearchComponentConfiguration.java
+++ 
b/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/es/springboot/ElasticsearchComponentConfiguration.java
@@ -41,6 +41,16 @@ public class ElasticsearchComponentConfiguration
      * The time in ms to wait before connection will timeout.
      */
     private Integer connectionTimeout = 30000;
+    /**
+     * Indicates whether the body of the message contains only documents. By
+     * default, it is set to false to be able to do the same requests as what
+     * the Document API supports (see
+     * 
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs.html
+     * for more details). To ease the migration of routes based on the legacy
+     * component camel-elasticsearch-rest, you should consider enabling the 
mode
+     * especially if your routes do update operations.
+     */
+    private Boolean enableDocumentOnlyMode = false;
     /**
      * Comma separated list with ip:port formatted remote transport addresses 
to
      * use. The ip and port options must be left blank for hostAddresses to be
@@ -124,6 +134,14 @@ public class ElasticsearchComponentConfiguration
         this.connectionTimeout = connectionTimeout;
     }
 
+    public Boolean getEnableDocumentOnlyMode() {
+        return enableDocumentOnlyMode;
+    }
+
+    public void setEnableDocumentOnlyMode(Boolean enableDocumentOnlyMode) {
+        this.enableDocumentOnlyMode = enableDocumentOnlyMode;
+    }
+
     public String getHostAddresses() {
         return hostAddresses;
     }

Reply via email to