camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/6] camel git commit: Adds support for UPDATE request, see [CAMEL-9358]
Date Wed, 25 Nov 2015 08:47:51 GMT
Repository: camel
Updated Branches:
  refs/heads/master b94bdacf2 -> e284fd657


Adds support for UPDATE request, see [CAMEL-9358]


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

Branch: refs/heads/master
Commit: ff20fbee35bf4c4932b1c016bfb7da824bd22eae
Parents: ab616f9
Author: acartapanis <acs@diginext.fr>
Authored: Tue Nov 24 16:42:11 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Nov 25 08:38:07 2015 +0100

----------------------------------------------------------------------
 .../converter/ElasticsearchActionRequestConverter.java       | 8 ++++----
 .../component/elasticsearch/ElasticsearchComponentTest.java  | 1 -
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ff20fbee/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/converter/ElasticsearchActionRequestConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/converter/ElasticsearchActionRequestConverter.java
b/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/converter/ElasticsearchActionRequestConverter.java
index 3849cba..cc6e9bd 100644
--- a/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/converter/ElasticsearchActionRequestConverter.java
+++ b/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/converter/ElasticsearchActionRequestConverter.java
@@ -63,7 +63,9 @@ public final class ElasticsearchActionRequestConverter {
                 .index(exchange.getIn().getHeader(
                         ElasticsearchConstants.PARAM_INDEX_NAME, String.class))
                 .type(exchange.getIn().getHeader(
-                        ElasticsearchConstants.PARAM_INDEX_TYPE, String.class));
+                        ElasticsearchConstants.PARAM_INDEX_TYPE, String.class))
+                .id(exchange.getIn().getHeader(
+                        ElasticsearchConstants.PARAM_INDEX_ID, String.class));
     }
 
 
@@ -93,9 +95,7 @@ public final class ElasticsearchActionRequestConverter {
                 .index(exchange.getIn().getHeader(
                         ElasticsearchConstants.PARAM_INDEX_NAME, String.class))
                 .type(exchange.getIn().getHeader(
-                        ElasticsearchConstants.PARAM_INDEX_TYPE, String.class))
-                .type(exchange.getIn().getHeader(
-                        ElasticsearchConstants.PARAM_INDEX_ID, String.class));
+                        ElasticsearchConstants.PARAM_INDEX_TYPE, String.class));
     }
 
     @Converter

http://git-wip-us.apache.org/repos/asf/camel/blob/ff20fbee/components/camel-elasticsearch/src/test/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentTest.java
----------------------------------------------------------------------
diff --git a/components/camel-elasticsearch/src/test/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentTest.java
b/components/camel-elasticsearch/src/test/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentTest.java
index 0b0cdba..0006920 100644
--- a/components/camel-elasticsearch/src/test/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentTest.java
+++ b/components/camel-elasticsearch/src/test/java/org/apache/camel/component/elasticsearch/ElasticsearchComponentTest.java
@@ -357,7 +357,6 @@ public class ElasticsearchComponentTest extends CamelTestSupport {
         String prefix = createPrefix();
 
         // first index data
-
         IndexRequest indexRequest = new IndexRequest(prefix + "foo", prefix + "bar", prefix
+ "testId");
         indexRequest.source("{\"" + prefix + "content\": \"" + prefix + "hello\"}");
         template.requestBody("direct:index", indexRequest, String.class);


Mime
View raw message