Repository: searchbox-io/Jest
Pull request #561 (2017-10-24 11:56:45)

TypeExists not working
this is a fix for https://github.com/searchbox-io/Jest/issues/547 and some other minor changes.



Patch:
diff --git a/jest-common/src/main/java/io/searchbox/action/AbstractAction.java b/jest-common/src/main/java/io/searchbox/action/AbstractAction.java
index 23bd04be..68202466 100644
--- a/jest-common/src/main/java/io/searchbox/action/AbstractAction.java
+++ b/jest-common/src/main/java/io/searchbox/action/AbstractAction.java
@@ -11,6 +11,7 @@ import com.google.gson.JsonParser;
 import com.google.gson.JsonSyntaxException;
 import io.searchbox.annotations.JestId;
 import io.searchbox.client.JestResult;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.params.Parameters;
 import io.searchbox.strings.StringUtils;
 import org.slf4j.Logger;
@@ -45,7 +46,6 @@ public abstract class AbstractAction<T extends JestResult> implements Action<T>
     private final ConcurrentMap<String, Object> headerMap = new ConcurrentHashMap<String, Object>();
     private final Multimap<String, Object> parameterMap = LinkedHashMultimap.create();
     private final Set<String> cleanApiParameters = new LinkedHashSet<String>();
-    private String URI;
 
     public AbstractAction() {
     }
@@ -139,8 +139,8 @@ public abstract class AbstractAction<T extends JestResult> implements Action<T>
     }
 
     @Override
-    public String getURI() {
-        String finalUri = URI;
+    public String getURI(ElasticsearchVersion elasticsearchVersion) {
+        String finalUri = buildURI(elasticsearchVersion);
         if (!parameterMap.isEmpty() || !cleanApiParameters.isEmpty()) {
             try {
                 finalUri += buildQueryString();
@@ -153,10 +153,6 @@ public abstract class AbstractAction<T extends JestResult> implements Action<T>
         return finalUri;
     }
 
-    protected void setURI(String URI) {
-        this.URI = URI;
-    }
-
     @Override
     public String getData(Gson gson) {
         if (payload == null) {
@@ -173,14 +169,20 @@ public abstract class AbstractAction<T extends JestResult> implements Action<T>
         return null;
     }
 
-    protected String buildURI() {
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
         StringBuilder sb = new StringBuilder();
 
         try {
-            if (!StringUtils.isBlank(indexName)) {
+            if (StringUtils.isNotBlank(indexName)) {
                 sb.append(URLEncoder.encode(indexName, CHARSET));
 
-                if (!StringUtils.isBlank(typeName)) {
+                String commandExtension = getURLCommandExtension(elasticsearchVersion);
+
+                if (StringUtils.isNotBlank(commandExtension)) {
+                    sb.append("/").append(URLEncoder.encode(commandExtension, CHARSET));
+                }
+
+                if (StringUtils.isNotBlank(typeName)) {
                     sb.append("/").append(URLEncoder.encode(typeName, CHARSET));
                 }
             }
@@ -193,6 +195,10 @@ public abstract class AbstractAction<T extends JestResult> implements Action<T>
         return sb.toString();
     }
 
+    protected String getURLCommandExtension(ElasticsearchVersion elasticsearchVersion) {
+        return null;
+    }
+
     protected String buildQueryString() throws UnsupportedEncodingException {
         StringBuilder queryString = new StringBuilder();
 
@@ -217,14 +223,14 @@ public abstract class AbstractAction<T extends JestResult> implements Action<T>
     @Override
     public String toString() {
         return MoreObjects.toStringHelper(this)
-                .add("uri", getURI())
+                .add("uri", getURI(ElasticsearchVersion.UNKNOWN))
                 .add("method", getRestMethodName())
                 .toString();
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(getURI(), getRestMethodName(), getHeaders(), payload);
+        return Objects.hash(getURI(ElasticsearchVersion.UNKNOWN), getRestMethodName(), getHeaders(), payload);
     }
 
     @Override
@@ -240,7 +246,7 @@ public abstract class AbstractAction<T extends JestResult> implements Action<T>
         }
 
         AbstractAction rhs = (AbstractAction) obj;
-        return Objects.equals(getURI(), rhs.getURI())
+        return Objects.equals(getURI(ElasticsearchVersion.UNKNOWN), rhs.getURI(ElasticsearchVersion.UNKNOWN))
                 && Objects.equals(getRestMethodName(), rhs.getRestMethodName())
                 && Objects.equals(getHeaders(), rhs.getHeaders())
                 && Objects.equals(payload, rhs.payload);
diff --git a/jest-common/src/main/java/io/searchbox/action/AbstractDocumentTargetedAction.java b/jest-common/src/main/java/io/searchbox/action/AbstractDocumentTargetedAction.java
index 4b27952a..d74dc5e9 100644
--- a/jest-common/src/main/java/io/searchbox/action/AbstractDocumentTargetedAction.java
+++ b/jest-common/src/main/java/io/searchbox/action/AbstractDocumentTargetedAction.java
@@ -1,6 +1,7 @@
 package io.searchbox.action;
 
 import io.searchbox.client.JestResult;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.strings.StringUtils;
 
 import java.io.UnsupportedEncodingException;
@@ -36,10 +37,10 @@ public abstract class AbstractDocumentTargetedAction<T extends JestResult> exten
     }
 
     @Override
-    protected String buildURI() {
-        StringBuilder sb = new StringBuilder(super.buildURI());
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        StringBuilder sb = new StringBuilder(super.buildURI(elasticsearchVersion));
 
-        if (!StringUtils.isBlank(id)) {
+        if (StringUtils.isNotBlank(id)) {
             try {
                 sb.append("/").append(URLEncoder.encode(id, CHARSET));
             } catch (UnsupportedEncodingException e) {
diff --git a/jest-common/src/main/java/io/searchbox/action/Action.java b/jest-common/src/main/java/io/searchbox/action/Action.java
index 4a905749..f9619117 100644
--- a/jest-common/src/main/java/io/searchbox/action/Action.java
+++ b/jest-common/src/main/java/io/searchbox/action/Action.java
@@ -2,6 +2,7 @@ package io.searchbox.action;
 
 import com.google.gson.Gson;
 import io.searchbox.client.JestResult;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 import java.util.Map;
 
@@ -10,10 +11,10 @@ import java.util.Map;
  */
 public interface Action<T extends JestResult> {
 
-    String getURI();
-
     String getRestMethodName();
 
+    String getURI(ElasticsearchVersion elasticsearchVersion);
+
     String getData(Gson gson);
 
     String getPathToResult();
diff --git a/jest-common/src/main/java/io/searchbox/client/config/ElasticsearchVersion.java b/jest-common/src/main/java/io/searchbox/client/config/ElasticsearchVersion.java
new file mode 100644
index 00000000..c01eccdd
--- /dev/null
+++ b/jest-common/src/main/java/io/searchbox/client/config/ElasticsearchVersion.java
@@ -0,0 +1,8 @@
+package io.searchbox.client.config;
+
+public enum ElasticsearchVersion {
+
+    UNKNOWN,
+    V2,
+    V55
+}
diff --git a/jest-common/src/main/java/io/searchbox/cluster/GetSettings.java b/jest-common/src/main/java/io/searchbox/cluster/GetSettings.java
index c3d569ad..5fde193a 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/GetSettings.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/GetSettings.java
@@ -2,6 +2,7 @@ package io.searchbox.cluster;
 
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * Retrieve cluster wide settings.
@@ -12,11 +13,10 @@ public class GetSettings extends GenericResultAbstractAction {
 
     protected GetSettings(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
-    protected String buildURI() {
-        return super.buildURI() + "/_cluster/settings";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_cluster/settings";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/cluster/Health.java b/jest-common/src/main/java/io/searchbox/cluster/Health.java
index 8bf06739..94d744a0 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/Health.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/Health.java
@@ -3,6 +3,7 @@ package io.searchbox.cluster;
 import com.google.common.base.Preconditions;
 import io.searchbox.action.AbstractMultiIndexActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.strings.StringUtils;
 
 import java.io.UnsupportedEncodingException;
@@ -43,15 +44,14 @@ public class Health extends GenericResultAbstractAction {
 
     protected Health(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
         StringBuilder sb = new StringBuilder("/_cluster/health/");
 
         try {
-            if (!StringUtils.isBlank(indexName)) {
+            if (StringUtils.isNotBlank(indexName)) {
                 sb.append(URLEncoder.encode(indexName, CHARSET));
             }
         } catch (UnsupportedEncodingException e) {
diff --git a/jest-common/src/main/java/io/searchbox/cluster/NodesHotThreads.java b/jest-common/src/main/java/io/searchbox/cluster/NodesHotThreads.java
index f6c89465..a6c9546c 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/NodesHotThreads.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/NodesHotThreads.java
@@ -3,6 +3,7 @@ package io.searchbox.cluster;
 import com.google.gson.JsonObject;
 import io.searchbox.action.AbstractMultiINodeActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * Allows to get the current hot threads on each node in the cluster.
@@ -15,12 +16,11 @@ public class NodesHotThreads extends GenericResultAbstractAction {
 
     protected NodesHotThreads(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_nodes/" +
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_nodes/" +
                 nodes +
                 "/hot_threads";
     }
diff --git a/jest-common/src/main/java/io/searchbox/cluster/NodesInfo.java b/jest-common/src/main/java/io/searchbox/cluster/NodesInfo.java
index dfa96e0f..f4e16f84 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/NodesInfo.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/NodesInfo.java
@@ -2,6 +2,7 @@ package io.searchbox.cluster;
 
 import io.searchbox.action.AbstractMultiINodeActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -11,11 +12,10 @@ public class NodesInfo extends GenericResultAbstractAction {
 
     protected NodesInfo(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
-    protected String buildURI() {
-        return super.buildURI() + "/_nodes/" + nodes;
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_nodes/" + nodes;
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/cluster/NodesShutdown.java b/jest-common/src/main/java/io/searchbox/cluster/NodesShutdown.java
index 61f253c1..3b3fe2f2 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/NodesShutdown.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/NodesShutdown.java
@@ -2,6 +2,7 @@ package io.searchbox.cluster;
 
 import io.searchbox.action.AbstractMultiINodeActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -11,12 +12,11 @@ public class NodesShutdown extends GenericResultAbstractAction {
 
     protected NodesShutdown(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_nodes/" +
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_nodes/" +
                 nodes +
                 "/_shutdown";
     }
diff --git a/jest-common/src/main/java/io/searchbox/cluster/NodesStats.java b/jest-common/src/main/java/io/searchbox/cluster/NodesStats.java
index f4b4fbcd..81c0a1b4 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/NodesStats.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/NodesStats.java
@@ -2,6 +2,7 @@ package io.searchbox.cluster;
 
 import io.searchbox.action.AbstractMultiINodeActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -11,12 +12,11 @@ public class NodesStats extends GenericResultAbstractAction {
 
     protected NodesStats(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_nodes/" +
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_nodes/" +
                 nodes +
                 "/stats";
     }
diff --git a/jest-common/src/main/java/io/searchbox/cluster/PendingClusterTasks.java b/jest-common/src/main/java/io/searchbox/cluster/PendingClusterTasks.java
index b801272c..62c8d104 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/PendingClusterTasks.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/PendingClusterTasks.java
@@ -2,16 +2,16 @@ package io.searchbox.cluster;
 
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 public class PendingClusterTasks extends GenericResultAbstractAction {
     protected PendingClusterTasks(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_cluster/pending_tasks";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_cluster/pending_tasks";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/cluster/Reroute.java b/jest-common/src/main/java/io/searchbox/cluster/Reroute.java
index 7416afb6..73a189a8 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/Reroute.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/Reroute.java
@@ -3,6 +3,7 @@ package io.searchbox.cluster;
 import com.google.common.collect.ImmutableMap;
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.cluster.reroute.RerouteCommand;
 
 import java.util.Collection;
@@ -14,7 +15,6 @@ public class Reroute extends GenericResultAbstractAction {
 
     protected Reroute(Builder builder) {
         super(builder);
-        setURI(buildURI());
 
         List<Map> actions = new LinkedList<>();
         for (RerouteCommand rerouteCommand : builder.commandList) {
@@ -26,8 +26,8 @@ public class Reroute extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_cluster/reroute";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_cluster/reroute";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/cluster/State.java b/jest-common/src/main/java/io/searchbox/cluster/State.java
index 2af30e49..c55f2d7d 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/State.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/State.java
@@ -2,6 +2,7 @@ package io.searchbox.cluster;
 
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -11,12 +12,11 @@ public class State extends GenericResultAbstractAction {
 
     protected State(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_cluster/state";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_cluster/state";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/cluster/Stats.java b/jest-common/src/main/java/io/searchbox/cluster/Stats.java
index 84ab0153..1de8b0a5 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/Stats.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/Stats.java
@@ -2,16 +2,16 @@ package io.searchbox.cluster;
 
 import io.searchbox.action.AbstractMultiINodeActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 public class Stats extends GenericResultAbstractAction {
     protected Stats(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_cluster/stats/nodes/" + nodes;
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_cluster/stats/nodes/" + nodes;
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/cluster/TasksInformation.java b/jest-common/src/main/java/io/searchbox/cluster/TasksInformation.java
index 0cfab1fe..1c0c06b7 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/TasksInformation.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/TasksInformation.java
@@ -1,6 +1,7 @@
 package io.searchbox.cluster;
 
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * Currently only supports retrieving information for a particular task
@@ -12,12 +13,11 @@ public class TasksInformation extends GenericResultAbstractAction {
     protected TasksInformation(Builder builder) {
         super(builder);
         task = builder.task;
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        String uri = super.buildURI() + "_tasks";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        String uri = super.buildURI(elasticsearchVersion) + "_tasks";
         if (task != null) {
             uri += "/" + task;
         }
diff --git a/jest-common/src/main/java/io/searchbox/cluster/UpdateSettings.java b/jest-common/src/main/java/io/searchbox/cluster/UpdateSettings.java
index 16661ee1..7a5712ff 100644
--- a/jest-common/src/main/java/io/searchbox/cluster/UpdateSettings.java
+++ b/jest-common/src/main/java/io/searchbox/cluster/UpdateSettings.java
@@ -2,6 +2,7 @@ package io.searchbox.cluster;
 
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * Allows to update cluster wide specific settings. Settings updated can either be persistent (applied cross restarts)
@@ -18,12 +19,11 @@ public class UpdateSettings extends GenericResultAbstractAction {
 
     protected UpdateSettings(Builder builder) {
         super(builder);
-        setURI(buildURI());
         this.payload = builder.source;
     }
 
-    protected String buildURI() {
-        return super.buildURI() + "/_cluster/settings";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_cluster/settings";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/Bulk.java b/jest-common/src/main/java/io/searchbox/core/Bulk.java
index 89a68665..72b7542f 100644
--- a/jest-common/src/main/java/io/searchbox/core/Bulk.java
+++ b/jest-common/src/main/java/io/searchbox/core/Bulk.java
@@ -6,6 +6,7 @@ import com.google.gson.JsonObject;
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.BulkableAction;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.params.Parameters;
 import io.searchbox.strings.StringUtils;
 import org.slf4j.Logger;
@@ -36,8 +37,6 @@ public class Bulk extends AbstractAction<BulkResult> {
         indexName = builder.defaultIndex;
         typeName = builder.defaultType;
         bulkableActions = builder.actions;
-
-        setURI(buildURI());
     }
 
     private Object getJson(Gson gson, Object source) {
@@ -67,13 +66,13 @@ public class Bulk extends AbstractAction<BulkResult> {
             Map<String, Map<String, String>> opMap = new LinkedHashMap<String, Map<String, String>>(1);
 
             Map<String, String> opDetails = new LinkedHashMap<String, String>(3);
-            if (!StringUtils.isBlank(action.getId())) {
+            if (StringUtils.isNotBlank(action.getId())) {
                 opDetails.put("_id", action.getId());
             }
-            if (!StringUtils.isBlank(action.getIndex())) {
+            if (StringUtils.isNotBlank(action.getIndex())) {
                 opDetails.put("_index", action.getIndex());
             }
-            if (!StringUtils.isBlank(action.getType())) {
+            if (StringUtils.isNotBlank(action.getType())) {
                 opDetails.put("_type", action.getType());
             }
 
@@ -115,8 +114,8 @@ public class Bulk extends AbstractAction<BulkResult> {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_bulk";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_bulk";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/Cat.java b/jest-common/src/main/java/io/searchbox/core/Cat.java
index 4253b0e1..185139dc 100644
--- a/jest-common/src/main/java/io/searchbox/core/Cat.java
+++ b/jest-common/src/main/java/io/searchbox/core/Cat.java
@@ -11,8 +11,8 @@ import io.searchbox.action.AbstractAction;
 import io.searchbox.action.AbstractMultiINodeActionBuilder;
 import io.searchbox.action.AbstractMultiIndexActionBuilder;
 import io.searchbox.action.AbstractMultiTypeActionBuilder;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.strings.StringUtils;
-
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 
@@ -26,12 +26,11 @@ public class Cat extends AbstractAction<CatResult> {
     protected <T extends AbstractAction.Builder<Cat, ? extends Builder> & CatBuilder> Cat(T builder) {
         super(builder);
         this.operationPath = builder.operationPath();
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        String uriSuffix = super.buildURI();
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        String uriSuffix = super.buildURI(elasticsearchVersion);
         try {
             if (!StringUtils.isBlank(nodes)) {
                 uriSuffix += URLEncoder.encode(nodes, CHARSET);
@@ -39,7 +38,6 @@ public class Cat extends AbstractAction<CatResult> {
         } catch (UnsupportedEncodingException e) {
             log.error("Error occurred while adding nodes to uri", e);
         }
-
         return "_cat/" + this.operationPath + (uriSuffix.isEmpty() ? "" : "/") + uriSuffix;
     }
 
diff --git a/jest-common/src/main/java/io/searchbox/core/ClearScroll.java b/jest-common/src/main/java/io/searchbox/core/ClearScroll.java
index 1baaef1b..e3acc8a9 100644
--- a/jest-common/src/main/java/io/searchbox/core/ClearScroll.java
+++ b/jest-common/src/main/java/io/searchbox/core/ClearScroll.java
@@ -2,6 +2,7 @@ package io.searchbox.core;
 
 import com.google.common.collect.ImmutableMap;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 import java.util.Collection;
 import java.util.LinkedHashSet;
@@ -21,8 +22,6 @@ public class ClearScroll extends GenericResultAbstractAction {
       uri = "/_search/scroll";
       this.payload = ImmutableMap.of("scroll_id", builder.getScrollIds());
     }
-
-    setURI(buildURI());
   }
 
   @Override
@@ -31,8 +30,8 @@ public class ClearScroll extends GenericResultAbstractAction {
   }
 
   @Override
-  protected String buildURI() {
-    return super.buildURI() + uri;
+  protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+    return super.buildURI(elasticsearchVersion) + uri;
   }
 
   public static class Builder extends GenericResultAbstractAction.Builder<ClearScroll, Builder> {
diff --git a/jest-common/src/main/java/io/searchbox/core/Count.java b/jest-common/src/main/java/io/searchbox/core/Count.java
index 904fe436..96d3ffdc 100644
--- a/jest-common/src/main/java/io/searchbox/core/Count.java
+++ b/jest-common/src/main/java/io/searchbox/core/Count.java
@@ -3,6 +3,7 @@ package io.searchbox.core;
 import com.google.gson.Gson;
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.AbstractMultiTypeActionBuilder;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -12,14 +13,12 @@ public class Count extends AbstractAction<CountResult> {
 
     protected Count(Builder builder) {
         super(builder);
-
         this.payload = builder.query;
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_count";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_count";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/Delete.java b/jest-common/src/main/java/io/searchbox/core/Delete.java
index 41c645c1..0a4c157d 100644
--- a/jest-common/src/main/java/io/searchbox/core/Delete.java
+++ b/jest-common/src/main/java/io/searchbox/core/Delete.java
@@ -11,7 +11,6 @@ public class Delete extends SingleResultAbstractDocumentTargetedAction implement
 
     protected Delete(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/DeleteByQuery.java b/jest-common/src/main/java/io/searchbox/core/DeleteByQuery.java
index 7ed2e226..72002f7a 100644
--- a/jest-common/src/main/java/io/searchbox/core/DeleteByQuery.java
+++ b/jest-common/src/main/java/io/searchbox/core/DeleteByQuery.java
@@ -2,6 +2,7 @@ package io.searchbox.core;
 
 import io.searchbox.action.AbstractMultiTypeActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * Delete By Query API  is removed in Elasticsearch version 2.0.
@@ -17,12 +18,11 @@ public class DeleteByQuery extends GenericResultAbstractAction {
         super(builder);
 
         this.payload = builder.query;
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_delete_by_query";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_delete_by_query";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/Explain.java b/jest-common/src/main/java/io/searchbox/core/Explain.java
index bbe7104c..2cfcc392 100644
--- a/jest-common/src/main/java/io/searchbox/core/Explain.java
+++ b/jest-common/src/main/java/io/searchbox/core/Explain.java
@@ -1,6 +1,7 @@
 package io.searchbox.core;
 
 import io.searchbox.action.SingleResultAbstractDocumentTargetedAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -10,7 +11,6 @@ public class Explain extends SingleResultAbstractDocumentTargetedAction {
 
     protected Explain(Builder builder) {
         super(builder);
-        setURI(buildURI());
         this.payload = builder.query;
     }
 
@@ -20,8 +20,8 @@ public class Explain extends SingleResultAbstractDocumentTargetedAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_explain";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_explain";
     }
 
     public static class Builder extends SingleResultAbstractDocumentTargetedAction.Builder<Explain, Builder> {
diff --git a/jest-common/src/main/java/io/searchbox/core/Get.java b/jest-common/src/main/java/io/searchbox/core/Get.java
index ecb9684f..fa8b9fc8 100644
--- a/jest-common/src/main/java/io/searchbox/core/Get.java
+++ b/jest-common/src/main/java/io/searchbox/core/Get.java
@@ -11,7 +11,6 @@ public class Get extends SingleResultAbstractDocumentTargetedAction {
 
     protected Get(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/Index.java b/jest-common/src/main/java/io/searchbox/core/Index.java
index 7163c3ee..7c2c37a3 100644
--- a/jest-common/src/main/java/io/searchbox/core/Index.java
+++ b/jest-common/src/main/java/io/searchbox/core/Index.java
@@ -14,9 +14,7 @@ public class Index extends SingleResultAbstractDocumentTargetedAction implements
 
     protected Index(Builder builder) {
         super(builder);
-
         this.payload = builder.source;
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/MultiGet.java b/jest-common/src/main/java/io/searchbox/core/MultiGet.java
index 4bdd7255..94dc716e 100644
--- a/jest-common/src/main/java/io/searchbox/core/MultiGet.java
+++ b/jest-common/src/main/java/io/searchbox/core/MultiGet.java
@@ -6,6 +6,7 @@ import com.google.common.collect.Lists;
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.AbstractMultiTypeActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 import java.util.Collection;
 import java.util.LinkedList;
@@ -19,7 +20,6 @@ public class MultiGet extends GenericResultAbstractAction {
 
     protected MultiGet(AbstractAction.Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     protected MultiGet(Builder.ByDoc builder) {
@@ -42,8 +42,8 @@ public class MultiGet extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_mget";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_mget";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/MultiSearch.java b/jest-common/src/main/java/io/searchbox/core/MultiSearch.java
index a3e14d5a..f955534e 100644
--- a/jest-common/src/main/java/io/searchbox/core/MultiSearch.java
+++ b/jest-common/src/main/java/io/searchbox/core/MultiSearch.java
@@ -4,6 +4,7 @@ import com.google.common.base.CharMatcher;
 import com.google.gson.Gson;
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.strings.StringUtils;
 
 import java.util.Collection;
@@ -22,9 +23,7 @@ public class MultiSearch extends AbstractAction<MultiSearchResult> {
 
     protected MultiSearch(Builder builder) {
         super(builder);
-
         this.searches = builder.searchList;
-        setURI(buildURI());
     }
 
     @Override
@@ -50,7 +49,7 @@ public class MultiSearch extends AbstractAction<MultiSearchResult> {
         StringBuilder sb = new StringBuilder();
         for (Search search : searches) {
             sb.append("{\"index\" : \"").append(search.getIndex());
-            if (!StringUtils.isBlank(search.getType())) {
+            if (StringUtils.isNotBlank(search.getType())) {
                 sb.append("\", \"type\" : \"").append(search.getType());
             }
             sb.append(getParameter(search, "ignore_unavailable"));
@@ -79,8 +78,8 @@ public class MultiSearch extends AbstractAction<MultiSearchResult> {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_msearch";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_msearch";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/Percolate.java b/jest-common/src/main/java/io/searchbox/core/Percolate.java
index 403c6fdd..e1fbd9da 100644
--- a/jest-common/src/main/java/io/searchbox/core/Percolate.java
+++ b/jest-common/src/main/java/io/searchbox/core/Percolate.java
@@ -1,6 +1,7 @@
 package io.searchbox.core;
 
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * Use this action to query on registered percolaters.
@@ -16,7 +17,6 @@ public class Percolate extends GenericResultAbstractAction {
         this.indexName = builder.index;
         this.typeName = builder.type;
         this.payload = builder.query;
-        setURI(buildURI());
     }
 
     @Override
@@ -25,8 +25,8 @@ public class Percolate extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_percolate";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_percolate";
     }
 
     public static class Builder extends GenericResultAbstractAction.Builder<Percolate, Builder> {
diff --git a/jest-common/src/main/java/io/searchbox/core/Ping.java b/jest-common/src/main/java/io/searchbox/core/Ping.java
index 69fe7745..0bd8d2ea 100644
--- a/jest-common/src/main/java/io/searchbox/core/Ping.java
+++ b/jest-common/src/main/java/io/searchbox/core/Ping.java
@@ -1,16 +1,16 @@
 package io.searchbox.core;
 
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 public class Ping extends GenericResultAbstractAction {
     protected Ping(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI();
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion);
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/Search.java b/jest-common/src/main/java/io/searchbox/core/Search.java
index 4287f67e..70811a28 100644
--- a/jest-common/src/main/java/io/searchbox/core/Search.java
+++ b/jest-common/src/main/java/io/searchbox/core/Search.java
@@ -15,6 +15,7 @@ import com.google.gson.JsonSyntaxException;
 
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.AbstractMultiTypeActionBuilder;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.core.search.sort.Sort;
 import io.searchbox.params.Parameters;
 import io.searchbox.params.SearchType;
@@ -26,29 +27,26 @@ import io.searchbox.params.SearchType;
 public class Search extends AbstractAction<SearchResult> {
 
     private String query;
-    private List<Sort> sortList = new LinkedList<Sort>();
-    protected List<String> includePatternList = new ArrayList<String>();
-    protected List<String> excludePatternList = new ArrayList<String>();
+    private List<Sort> sortList;
+    protected List<String> includePatternList;
+    protected List<String> excludePatternList;
+    private final String templateSuffix;
 
     protected Search(Builder builder) {
-        super(builder);
+        this(builder, "");
+    }
+
+    protected Search(TemplateBuilder templatedBuilder) {
+        this(templatedBuilder, "/template");
+    }
 
+    private Search(Builder builder, String templateSuffix) {
+        super(builder);
         this.query = builder.query;
         this.sortList = builder.sortList;
         this.includePatternList = builder.includePatternList;
         this.excludePatternList = builder.excludePatternList;
-        setURI(buildURI());
-    }
-
-    protected Search(TemplateBuilder templatedBuilder) {
-        super(templatedBuilder);
-
-        //reuse query as it's just the request body of the POST
-        this.query = templatedBuilder.query;
-        this.sortList = templatedBuilder.sortList;
-        this.includePatternList = templatedBuilder.includePatternList;
-        this.excludePatternList = templatedBuilder.excludePatternList;
-        setURI(buildURI() + "/template");
+        this.templateSuffix = templateSuffix;
     }
 
     @Override
@@ -65,8 +63,8 @@ public class Search extends AbstractAction<SearchResult> {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_search";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_search" + templateSuffix;
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/SearchScroll.java b/jest-common/src/main/java/io/searchbox/core/SearchScroll.java
index ec335821..bff5a91d 100644
--- a/jest-common/src/main/java/io/searchbox/core/SearchScroll.java
+++ b/jest-common/src/main/java/io/searchbox/core/SearchScroll.java
@@ -5,6 +5,7 @@ import com.google.common.base.Joiner;
 import com.google.gson.JsonObject;
 import io.searchbox.action.AbstractMultiIndexActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.params.Parameters;
 
 /**
@@ -30,12 +31,11 @@ public class SearchScroll extends GenericResultAbstractAction {
         } else {
             this.restMethodName = "GET";
         }
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_search/scroll";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_search/scroll";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/SearchShards.java b/jest-common/src/main/java/io/searchbox/core/SearchShards.java
index 7799714c..b12a6ceb 100644
--- a/jest-common/src/main/java/io/searchbox/core/SearchShards.java
+++ b/jest-common/src/main/java/io/searchbox/core/SearchShards.java
@@ -2,6 +2,7 @@ package io.searchbox.core;
 
 import io.searchbox.action.AbstractMultiTypeActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * The search shards api returns the indices and shards that a search request would be executed against.
@@ -13,12 +14,11 @@ public class SearchShards extends GenericResultAbstractAction {
 
     protected SearchShards(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_search_shards";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_search_shards";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/Suggest.java b/jest-common/src/main/java/io/searchbox/core/Suggest.java
index 5bfbe86c..cb668ea1 100644
--- a/jest-common/src/main/java/io/searchbox/core/Suggest.java
+++ b/jest-common/src/main/java/io/searchbox/core/Suggest.java
@@ -3,14 +3,13 @@ package io.searchbox.core;
 import com.google.gson.Gson;
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.AbstractMultiTypeActionBuilder;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 public class Suggest extends AbstractAction<SuggestResult> {
 
     protected Suggest(final Builder builder) {
         super(builder);
-
         this.payload = builder.getQuery();
-        this.setURI(this.buildURI());
     }
 
     @Override
@@ -32,8 +31,8 @@ public class Suggest extends AbstractAction<SuggestResult> {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_suggest";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_suggest";
     }
 
     public static class Builder extends AbstractMultiTypeActionBuilder<Suggest, Builder> {
diff --git a/jest-common/src/main/java/io/searchbox/core/Update.java b/jest-common/src/main/java/io/searchbox/core/Update.java
index 0826be01..5bcdb1c8 100644
--- a/jest-common/src/main/java/io/searchbox/core/Update.java
+++ b/jest-common/src/main/java/io/searchbox/core/Update.java
@@ -2,6 +2,7 @@ package io.searchbox.core;
 
 import io.searchbox.action.BulkableAction;
 import io.searchbox.action.SingleResultAbstractDocumentTargetedAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.params.Parameters;
 
 /**
@@ -12,9 +13,7 @@ public class Update extends SingleResultAbstractDocumentTargetedAction implement
 
     protected Update(Builder builder) {
         super(builder);
-
         this.payload = builder.payload;
-        setURI(buildURI());
     }
 
     @Override
@@ -23,8 +22,8 @@ public class Update extends SingleResultAbstractDocumentTargetedAction implement
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_update";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_update";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/UpdateByQuery.java b/jest-common/src/main/java/io/searchbox/core/UpdateByQuery.java
index f067dbeb..032146c5 100644
--- a/jest-common/src/main/java/io/searchbox/core/UpdateByQuery.java
+++ b/jest-common/src/main/java/io/searchbox/core/UpdateByQuery.java
@@ -3,6 +3,8 @@ package io.searchbox.core;
 import com.google.gson.Gson;
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.AbstractMultiTypeActionBuilder;
+import io.searchbox.client.config.ElasticsearchVersion;
+
 import java.util.Objects;
 
 /**
@@ -12,14 +14,12 @@ public class UpdateByQuery extends AbstractAction<UpdateByQueryResult> {
 
     protected UpdateByQuery(Builder builder) {
         super(builder);
-
         this.payload = builder.payload;
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_update_by_query";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_update_by_query";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/core/Validate.java b/jest-common/src/main/java/io/searchbox/core/Validate.java
index 7d6182da..e9b5e18c 100644
--- a/jest-common/src/main/java/io/searchbox/core/Validate.java
+++ b/jest-common/src/main/java/io/searchbox/core/Validate.java
@@ -1,6 +1,7 @@
 package io.searchbox.core;
 
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -14,12 +15,11 @@ public class Validate extends GenericResultAbstractAction {
         this.indexName = builder.index;
         this.typeName = builder.type;
         this.payload = builder.query;
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_validate/query";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_validate/query";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/Analyze.java b/jest-common/src/main/java/io/searchbox/indices/Analyze.java
index c9892375..be6a44d1 100644
--- a/jest-common/src/main/java/io/searchbox/indices/Analyze.java
+++ b/jest-common/src/main/java/io/searchbox/indices/Analyze.java
@@ -3,6 +3,7 @@ package io.searchbox.indices;
 import com.google.gson.Gson;
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -21,12 +22,11 @@ public class Analyze extends GenericResultAbstractAction {
 
         this.indexName = builder.index;
         this.payload = "{\"text\": " + new Gson().toJson(builder.textToAnalyze) + "}";
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_analyze";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_analyze";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/ClearCache.java b/jest-common/src/main/java/io/searchbox/indices/ClearCache.java
index 34f5f886..0d77186c 100644
--- a/jest-common/src/main/java/io/searchbox/indices/ClearCache.java
+++ b/jest-common/src/main/java/io/searchbox/indices/ClearCache.java
@@ -2,6 +2,7 @@ package io.searchbox.indices;
 
 import io.searchbox.action.AbstractMultiIndexActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -11,12 +12,11 @@ public class ClearCache extends GenericResultAbstractAction {
 
     protected ClearCache(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_cache/clear";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_cache/clear";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/CloseIndex.java b/jest-common/src/main/java/io/searchbox/indices/CloseIndex.java
index 06220709..cb69f95a 100644
--- a/jest-common/src/main/java/io/searchbox/indices/CloseIndex.java
+++ b/jest-common/src/main/java/io/searchbox/indices/CloseIndex.java
@@ -1,6 +1,7 @@
 package io.searchbox.indices;
 
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author cihat keser
@@ -11,12 +12,11 @@ public class CloseIndex extends GenericResultAbstractAction {
         super(builder);
 
         this.indexName = builder.index;
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_close";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_close";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/CreateIndex.java b/jest-common/src/main/java/io/searchbox/indices/CreateIndex.java
index 2ac8ba11..88490f73 100644
--- a/jest-common/src/main/java/io/searchbox/indices/CreateIndex.java
+++ b/jest-common/src/main/java/io/searchbox/indices/CreateIndex.java
@@ -19,7 +19,6 @@ public class CreateIndex extends GenericResultAbstractAction {
         } else {
             this.payload = new Object();
         }
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/DeleteIndex.java b/jest-common/src/main/java/io/searchbox/indices/DeleteIndex.java
index a44dc2b1..f5af5a38 100644
--- a/jest-common/src/main/java/io/searchbox/indices/DeleteIndex.java
+++ b/jest-common/src/main/java/io/searchbox/indices/DeleteIndex.java
@@ -12,7 +12,6 @@ public class DeleteIndex extends GenericResultAbstractAction {
         super(builder);
         indexName = builder.index;
         typeName = builder.type;
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/DocumentExists.java b/jest-common/src/main/java/io/searchbox/indices/DocumentExists.java
new file mode 100644
index 00000000..d13233cb
--- /dev/null
+++ b/jest-common/src/main/java/io/searchbox/indices/DocumentExists.java
@@ -0,0 +1,34 @@
+package io.searchbox.indices;
+
+import com.google.gson.Gson;
+import io.searchbox.action.AbstractDocumentTargetedAction;
+
+public class DocumentExists extends AbstractDocumentTargetedAction<DocumentExistsResult> {
+
+    DocumentExists(DocumentExists.Builder builder) {
+        super(builder);
+    }
+
+    @Override
+    public String getRestMethodName() {
+        return "HEAD";
+    }
+
+    @Override
+    public DocumentExistsResult createNewElasticSearchResult(String responseBody, int statusCode, String reasonPhrase, Gson gson) {
+        return createNewElasticSearchResult(new DocumentExistsResult(gson), responseBody, statusCode, reasonPhrase, gson);
+    }
+
+    public static class Builder extends AbstractDocumentTargetedAction.Builder<DocumentExists, DocumentExists.Builder> {
+
+        public Builder(String index, String type, String id) {
+            this.index(index);
+            this.type(type);
+            this.id(id);
+        }
+
+        public DocumentExists build() {
+            return new DocumentExists(this);
+        }
+    }
+}
\ No newline at end of file
diff --git a/jest-common/src/main/java/io/searchbox/indices/DocumentExistsResult.java b/jest-common/src/main/java/io/searchbox/indices/DocumentExistsResult.java
new file mode 100644
index 00000000..fb5f145e
--- /dev/null
+++ b/jest-common/src/main/java/io/searchbox/indices/DocumentExistsResult.java
@@ -0,0 +1,15 @@
+package io.searchbox.indices;
+
+import com.google.gson.Gson;
+import io.searchbox.client.JestResult;
+
+public class DocumentExistsResult extends JestResult {
+
+    DocumentExistsResult(Gson gson) {
+        super(gson);
+    }
+
+    public boolean documentExists() {
+        return isSucceeded();
+    }
+}
diff --git a/jest-common/src/main/java/io/searchbox/indices/Flush.java b/jest-common/src/main/java/io/searchbox/indices/Flush.java
index 52114981..1d6bf774 100644
--- a/jest-common/src/main/java/io/searchbox/indices/Flush.java
+++ b/jest-common/src/main/java/io/searchbox/indices/Flush.java
@@ -2,6 +2,7 @@ package io.searchbox.indices;
 
 import io.searchbox.action.AbstractMultiIndexActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -11,12 +12,11 @@ public class Flush extends GenericResultAbstractAction {
 
     protected Flush(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_flush";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_flush";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/ForceMerge.java b/jest-common/src/main/java/io/searchbox/indices/ForceMerge.java
index 893d331b..9d248db7 100644
--- a/jest-common/src/main/java/io/searchbox/indices/ForceMerge.java
+++ b/jest-common/src/main/java/io/searchbox/indices/ForceMerge.java
@@ -2,6 +2,7 @@ package io.searchbox.indices;
 
 import io.searchbox.action.AbstractMultiIndexActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * Force-merge API: https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-forcemerge.html
@@ -16,7 +17,6 @@ public class ForceMerge extends GenericResultAbstractAction {
 
     protected ForceMerge(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
@@ -25,8 +25,8 @@ public class ForceMerge extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_forcemerge";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_forcemerge";
     }
 
     public static class Builder extends AbstractMultiIndexActionBuilder<ForceMerge, Builder> {
diff --git a/jest-common/src/main/java/io/searchbox/indices/IndicesExists.java b/jest-common/src/main/java/io/searchbox/indices/IndicesExists.java
index b00b824c..1cfa63ad 100644
--- a/jest-common/src/main/java/io/searchbox/indices/IndicesExists.java
+++ b/jest-common/src/main/java/io/searchbox/indices/IndicesExists.java
@@ -12,7 +12,6 @@ public class IndicesExists extends GenericResultAbstractAction {
 
     protected IndicesExists(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/OpenIndex.java b/jest-common/src/main/java/io/searchbox/indices/OpenIndex.java
index a4b57d73..4da06f42 100644
--- a/jest-common/src/main/java/io/searchbox/indices/OpenIndex.java
+++ b/jest-common/src/main/java/io/searchbox/indices/OpenIndex.java
@@ -1,6 +1,7 @@
 package io.searchbox.indices;
 
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author cihat keser
@@ -10,12 +11,11 @@ public class OpenIndex extends GenericResultAbstractAction {
     protected OpenIndex(Builder builder) {
         super(builder);
         this.indexName = builder.index;
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_open";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_open";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/Optimize.java b/jest-common/src/main/java/io/searchbox/indices/Optimize.java
index f9aa28f4..4fdbb04f 100644
--- a/jest-common/src/main/java/io/searchbox/indices/Optimize.java
+++ b/jest-common/src/main/java/io/searchbox/indices/Optimize.java
@@ -2,6 +2,7 @@ package io.searchbox.indices;
 
 import io.searchbox.action.AbstractMultiIndexActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * Optimize API: https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-optimize.html
@@ -15,7 +16,6 @@ public class Optimize extends GenericResultAbstractAction {
 
     protected Optimize(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
@@ -24,8 +24,8 @@ public class Optimize extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_optimize";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_optimize";
     }
 
     public static class Builder extends AbstractMultiIndexActionBuilder<Optimize, Builder> {
diff --git a/jest-common/src/main/java/io/searchbox/indices/Refresh.java b/jest-common/src/main/java/io/searchbox/indices/Refresh.java
index ab57e77c..e3f3fc18 100644
--- a/jest-common/src/main/java/io/searchbox/indices/Refresh.java
+++ b/jest-common/src/main/java/io/searchbox/indices/Refresh.java
@@ -2,6 +2,7 @@ package io.searchbox.indices;
 
 import io.searchbox.action.AbstractMultiIndexActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -11,7 +12,6 @@ public class Refresh extends GenericResultAbstractAction {
 
     protected Refresh(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
@@ -20,8 +20,8 @@ public class Refresh extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_refresh";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_refresh";
     }
 
     public static class Builder extends AbstractMultiIndexActionBuilder<Refresh, Builder> {
diff --git a/jest-common/src/main/java/io/searchbox/indices/Rollover.java b/jest-common/src/main/java/io/searchbox/indices/Rollover.java
index cc9d3df5..d16b14b3 100644
--- a/jest-common/src/main/java/io/searchbox/indices/Rollover.java
+++ b/jest-common/src/main/java/io/searchbox/indices/Rollover.java
@@ -2,12 +2,15 @@ package io.searchbox.indices;
 
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 import java.util.HashMap;
 import java.util.Map;
 
 public class Rollover extends GenericResultAbstractAction {
 
+    private boolean isDryRun;
+
     protected Rollover(Rollover.Builder builder) {
         super(builder);
 
@@ -21,7 +24,7 @@ public class Rollover extends GenericResultAbstractAction {
         }
         this.payload = rolloverConditions;
 
-        setURI(buildURI() + (builder.isDryRun ? "?dry_run" : ""));
+        isDryRun = builder.isDryRun;
     }
 
     @Override
@@ -30,11 +33,10 @@ public class Rollover extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_rollover";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_rollover" + (isDryRun ? "?dry_run" : "");
     }
 
-
     public static class Builder extends AbstractAction.Builder<Rollover, Rollover.Builder> {
 
         private String index;
diff --git a/jest-common/src/main/java/io/searchbox/indices/Stats.java b/jest-common/src/main/java/io/searchbox/indices/Stats.java
index 24a20672..45d8c404 100644
--- a/jest-common/src/main/java/io/searchbox/indices/Stats.java
+++ b/jest-common/src/main/java/io/searchbox/indices/Stats.java
@@ -3,6 +3,7 @@ package io.searchbox.indices;
 import com.google.common.base.Joiner;
 import io.searchbox.action.AbstractMultiIndexActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -13,8 +14,6 @@ public class Stats extends GenericResultAbstractAction {
     protected Stats(Builder builder) {
         super(builder);
         indexName = builder.getJoinedIndices();
-
-        setURI(buildURI());
     }
 
     @Override
@@ -23,8 +22,8 @@ public class Stats extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_stats";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_stats";
     }
 
     public static class Builder extends AbstractMultiIndexActionBuilder<Stats, Builder> {
diff --git a/jest-common/src/main/java/io/searchbox/indices/aliases/AliasExists.java b/jest-common/src/main/java/io/searchbox/indices/aliases/AliasExists.java
index 36b8c423..5fd5c045 100644
--- a/jest-common/src/main/java/io/searchbox/indices/aliases/AliasExists.java
+++ b/jest-common/src/main/java/io/searchbox/indices/aliases/AliasExists.java
@@ -2,6 +2,7 @@ package io.searchbox.indices.aliases;
 
 import io.searchbox.action.AbstractMultiIndexActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 public class AliasExists extends GenericResultAbstractAction {
     private String alias;
@@ -9,7 +10,6 @@ public class AliasExists extends GenericResultAbstractAction {
     protected AliasExists(Builder builder, String alias) {
         super(builder);
         this.alias = alias;
-        setURI(buildURI());
     }
 
     @Override
@@ -18,8 +18,8 @@ public class AliasExists extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_alias/" + alias;
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_alias/" + alias;
     }
 
     public static class Builder extends AbstractMultiIndexActionBuilder<AliasExists, Builder> {
diff --git a/jest-common/src/main/java/io/searchbox/indices/aliases/GetAliases.java b/jest-common/src/main/java/io/searchbox/indices/aliases/GetAliases.java
index 965ef960..11e19bf6 100644
--- a/jest-common/src/main/java/io/searchbox/indices/aliases/GetAliases.java
+++ b/jest-common/src/main/java/io/searchbox/indices/aliases/GetAliases.java
@@ -3,6 +3,7 @@ package io.searchbox.indices.aliases;
 import com.google.common.base.Joiner;
 import io.searchbox.action.AbstractMultiIndexActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 import java.util.Collection;
 import java.util.LinkedHashSet;
 import java.util.Set;
@@ -16,7 +17,6 @@ public class GetAliases extends GenericResultAbstractAction {
     protected GetAliases(Builder builder) {
         super(builder);
         aliasName = builder.getJoinedAliases();
-        setURI(buildURI());
     }
 
     @Override
@@ -25,11 +25,11 @@ public class GetAliases extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
         if (aliasName == null){
-            return super.buildURI() + "/_alias";
+            return super.buildURI(elasticsearchVersion) + "/_alias";
         } else {
-            return super.buildURI() + "/_alias/" + aliasName;
+            return super.buildURI(elasticsearchVersion) + "/_alias/" + aliasName;
         }
     }
 
diff --git a/jest-common/src/main/java/io/searchbox/indices/aliases/ModifyAliases.java b/jest-common/src/main/java/io/searchbox/indices/aliases/ModifyAliases.java
index 0fb23095..b581bf42 100644
--- a/jest-common/src/main/java/io/searchbox/indices/aliases/ModifyAliases.java
+++ b/jest-common/src/main/java/io/searchbox/indices/aliases/ModifyAliases.java
@@ -2,6 +2,7 @@ package io.searchbox.indices.aliases;
 
 import com.google.common.collect.ImmutableMap;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 import java.util.Collection;
 import java.util.LinkedList;
@@ -21,12 +22,11 @@ public class ModifyAliases extends GenericResultAbstractAction {
             actions.addAll(aliasMapping.getData());
         }
         this.payload = ImmutableMap.<String, Object>of("actions", actions);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_aliases";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_aliases";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/mapping/DeleteMapping.java b/jest-common/src/main/java/io/searchbox/indices/mapping/DeleteMapping.java
index baad25a3..37769d95 100644
--- a/jest-common/src/main/java/io/searchbox/indices/mapping/DeleteMapping.java
+++ b/jest-common/src/main/java/io/searchbox/indices/mapping/DeleteMapping.java
@@ -2,6 +2,7 @@ package io.searchbox.indices.mapping;
 
 
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author Dogukan Sonmez
@@ -14,12 +15,11 @@ public class DeleteMapping extends GenericResultAbstractAction {
 
         this.indexName = builder.index;
         this.typeName = builder.type;
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_mapping";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_mapping";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/mapping/GetMapping.java b/jest-common/src/main/java/io/searchbox/indices/mapping/GetMapping.java
index 59db4f9d..5130e344 100644
--- a/jest-common/src/main/java/io/searchbox/indices/mapping/GetMapping.java
+++ b/jest-common/src/main/java/io/searchbox/indices/mapping/GetMapping.java
@@ -2,6 +2,7 @@ package io.searchbox.indices.mapping;
 
 import io.searchbox.action.AbstractMultiTypeActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author ferhat
@@ -11,7 +12,6 @@ public class GetMapping extends GenericResultAbstractAction {
 
     protected GetMapping(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
@@ -20,8 +20,8 @@ public class GetMapping extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_mapping";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_mapping";
     }
 
     public static class Builder extends AbstractMultiTypeActionBuilder<GetMapping, Builder> {
diff --git a/jest-common/src/main/java/io/searchbox/indices/mapping/PutMapping.java b/jest-common/src/main/java/io/searchbox/indices/mapping/PutMapping.java
index c4e75790..ff96c107 100644
--- a/jest-common/src/main/java/io/searchbox/indices/mapping/PutMapping.java
+++ b/jest-common/src/main/java/io/searchbox/indices/mapping/PutMapping.java
@@ -1,6 +1,7 @@
 package io.searchbox.indices.mapping;
 
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author ferhat
@@ -14,12 +15,11 @@ public class PutMapping extends GenericResultAbstractAction {
         this.indexName = builder.index;
         this.typeName = builder.type;
         this.payload = builder.source;
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_mapping";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_mapping";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/reindex/Reindex.java b/jest-common/src/main/java/io/searchbox/indices/reindex/Reindex.java
index 69bc7c3d..90989207 100644
--- a/jest-common/src/main/java/io/searchbox/indices/reindex/Reindex.java
+++ b/jest-common/src/main/java/io/searchbox/indices/reindex/Reindex.java
@@ -6,6 +6,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import com.google.common.collect.ImmutableMap;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author fabien baligand
@@ -28,13 +29,11 @@ public class Reindex extends GenericResultAbstractAction {
             payload.put("script", builder.script);
         }
         this.payload = ImmutableMap.copyOf(payload);
-        
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_reindex";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_reindex";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/script/AbstractStoredScript.java b/jest-common/src/main/java/io/searchbox/indices/script/AbstractStoredScript.java
index e30221aa..2abebb9c 100644
--- a/jest-common/src/main/java/io/searchbox/indices/script/AbstractStoredScript.java
+++ b/jest-common/src/main/java/io/searchbox/indices/script/AbstractStoredScript.java
@@ -2,6 +2,7 @@ package io.searchbox.indices.script;
 
 import io.searchbox.action.AbstractAction;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 import java.io.UnsupportedEncodingException;
 
@@ -21,8 +22,8 @@ public abstract class AbstractStoredScript extends GenericResultAbstractAction {
         this.scriptLanguage = builder.scriptLanguage;
     }
 
-    protected String buildURI() {
-        String finalUri = super.buildURI() + "/_scripts/" + scriptLanguage.pathParameterName + "/";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        String finalUri = super.buildURI(elasticsearchVersion) + "/_scripts/" + scriptLanguage.pathParameterName + "/";
         try {
             finalUri += encode(scriptName, CHARSET);
         } catch (UnsupportedEncodingException e) {
diff --git a/jest-common/src/main/java/io/searchbox/indices/script/GetStoredScript.java b/jest-common/src/main/java/io/searchbox/indices/script/GetStoredScript.java
index 20cf4b94..9e806277 100644
--- a/jest-common/src/main/java/io/searchbox/indices/script/GetStoredScript.java
+++ b/jest-common/src/main/java/io/searchbox/indices/script/GetStoredScript.java
@@ -6,7 +6,6 @@ package io.searchbox.indices.script;
 public class GetStoredScript extends AbstractStoredScript {
     protected GetStoredScript(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/settings/IndicesSettingsAbstractAction.java b/jest-common/src/main/java/io/searchbox/indices/settings/IndicesSettingsAbstractAction.java
index d9a024ed..c01e7bf8 100644
--- a/jest-common/src/main/java/io/searchbox/indices/settings/IndicesSettingsAbstractAction.java
+++ b/jest-common/src/main/java/io/searchbox/indices/settings/IndicesSettingsAbstractAction.java
@@ -1,6 +1,7 @@
 package io.searchbox.indices.settings;
 
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author cihat keser
@@ -9,12 +10,11 @@ public abstract class IndicesSettingsAbstractAction extends GenericResultAbstrac
 
     protected IndicesSettingsAbstractAction(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_settings";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_settings";
     }
 
 }
diff --git a/jest-common/src/main/java/io/searchbox/indices/template/DeleteTemplate.java b/jest-common/src/main/java/io/searchbox/indices/template/DeleteTemplate.java
index 6dd7ec17..e7b76fcd 100644
--- a/jest-common/src/main/java/io/searchbox/indices/template/DeleteTemplate.java
+++ b/jest-common/src/main/java/io/searchbox/indices/template/DeleteTemplate.java
@@ -8,7 +8,6 @@ public class DeleteTemplate extends TemplateAction {
 
     protected DeleteTemplate(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/template/GetTemplate.java b/jest-common/src/main/java/io/searchbox/indices/template/GetTemplate.java
index 86ac1ce4..5b2a5ee8 100644
--- a/jest-common/src/main/java/io/searchbox/indices/template/GetTemplate.java
+++ b/jest-common/src/main/java/io/searchbox/indices/template/GetTemplate.java
@@ -8,7 +8,6 @@ public class GetTemplate extends TemplateAction {
 
     protected GetTemplate(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/template/PutTemplate.java b/jest-common/src/main/java/io/searchbox/indices/template/PutTemplate.java
index c5b02186..11782262 100644
--- a/jest-common/src/main/java/io/searchbox/indices/template/PutTemplate.java
+++ b/jest-common/src/main/java/io/searchbox/indices/template/PutTemplate.java
@@ -10,7 +10,6 @@ public class PutTemplate extends TemplateAction {
         super(builder);
 
         this.payload = builder.source;
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/template/TemplateAction.java b/jest-common/src/main/java/io/searchbox/indices/template/TemplateAction.java
index 16c7501c..3070c879 100644
--- a/jest-common/src/main/java/io/searchbox/indices/template/TemplateAction.java
+++ b/jest-common/src/main/java/io/searchbox/indices/template/TemplateAction.java
@@ -1,6 +1,7 @@
 package io.searchbox.indices.template;
 
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author cihat keser
@@ -15,10 +16,8 @@ public abstract class TemplateAction extends GenericResultAbstractAction {
     }
 
     @Override
-    protected String buildURI() {
-        StringBuilder sb = new StringBuilder("_template/");
-        sb.append(templateName);
-        return sb.toString();
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return "_template/" + templateName;
     }
 
     protected abstract static class Builder<T extends TemplateAction, K> extends GenericResultAbstractAction.Builder<T, K> {
diff --git a/jest-common/src/main/java/io/searchbox/indices/type/TypeExist.java b/jest-common/src/main/java/io/searchbox/indices/type/TypeExist.java
index 3ac7ffd5..20e0bcb2 100644
--- a/jest-common/src/main/java/io/searchbox/indices/type/TypeExist.java
+++ b/jest-common/src/main/java/io/searchbox/indices/type/TypeExist.java
@@ -2,32 +2,37 @@ package io.searchbox.indices.type;
 
 import io.searchbox.action.AbstractMultiTypeActionBuilder;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
- * @author happyprg(hongsgo@gmail.com)
+ * @author happyprg(hongsgo @ gmail.com)
  */
 public class TypeExist extends GenericResultAbstractAction {
 
-	protected TypeExist(Builder builder) {
-		super(builder);
-		setURI(buildURI());
-	}
+    TypeExist(Builder builder) {
+        super(builder);
+    }
 
-	@Override
-	public String getRestMethodName() {
-		return "HEAD";
-	}
+    @Override
+    protected String getURLCommandExtension(ElasticsearchVersion elasticsearchVersion) {
+        return elasticsearchVersion == ElasticsearchVersion.V55 ? "_mapping" : super.getURLCommandExtension(elasticsearchVersion);
+    }
 
-	public static class Builder extends AbstractMultiTypeActionBuilder<TypeExist, Builder> {
+    @Override
+    public String getRestMethodName() {
+        return "HEAD";
+    }
 
-		public Builder(String index) {
-			addIndex(index);
-		}
+    public static class Builder extends AbstractMultiTypeActionBuilder<TypeExist, Builder> {
 
-		@Override
-		public TypeExist build() {
-			return new TypeExist(this);
-		}
-	}
+        public Builder(String index) {
+            addIndex(index);
+        }
+
+        @Override
+        public TypeExist build() {
+            return new TypeExist(this);
+        }
+    }
 
 }
diff --git a/jest-common/src/main/java/io/searchbox/snapshot/AbstractSnapshotAction.java b/jest-common/src/main/java/io/searchbox/snapshot/AbstractSnapshotAction.java
index eaa43cdf..06525fa8 100644
--- a/jest-common/src/main/java/io/searchbox/snapshot/AbstractSnapshotAction.java
+++ b/jest-common/src/main/java/io/searchbox/snapshot/AbstractSnapshotAction.java
@@ -2,6 +2,7 @@ package io.searchbox.snapshot;
 
 import com.google.common.base.Joiner;
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 import java.util.Collection;
 import java.util.LinkedHashSet;
@@ -20,12 +21,11 @@ public abstract class AbstractSnapshotAction extends GenericResultAbstractAction
 
         this.repository = builder.repository;
         this.snapshots = builder.getSnapshots();
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_snapshot/" + repository + "/" + snapshots;
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_snapshot/" + repository + "/" + snapshots;
     }
 
     public abstract static class SnapshotBuilder<T extends AbstractSnapshotAction, K> extends Builder<T, K> {
diff --git a/jest-common/src/main/java/io/searchbox/snapshot/AbstractSnapshotRepositoryAction.java b/jest-common/src/main/java/io/searchbox/snapshot/AbstractSnapshotRepositoryAction.java
index 6d8e67d3..d75b31c3 100644
--- a/jest-common/src/main/java/io/searchbox/snapshot/AbstractSnapshotRepositoryAction.java
+++ b/jest-common/src/main/java/io/searchbox/snapshot/AbstractSnapshotRepositoryAction.java
@@ -1,6 +1,7 @@
 package io.searchbox.snapshot;
 
 import io.searchbox.action.GenericResultAbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 
 /**
  * @author ckeser
@@ -13,12 +14,11 @@ public abstract class AbstractSnapshotRepositoryAction extends GenericResultAbst
         super(builder);
 
         this.repositories = builder.getRepositories();
-        setURI(buildURI());
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_snapshot/" + repositories;
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_snapshot/" + repositories;
     }
 
     public abstract static class RepositoryBuilder<T extends AbstractSnapshotRepositoryAction, K> extends Builder<T, K> {
diff --git a/jest-common/src/main/java/io/searchbox/snapshot/RestoreSnapshot.java b/jest-common/src/main/java/io/searchbox/snapshot/RestoreSnapshot.java
index a4e82e84..a3172919 100644
--- a/jest-common/src/main/java/io/searchbox/snapshot/RestoreSnapshot.java
+++ b/jest-common/src/main/java/io/searchbox/snapshot/RestoreSnapshot.java
@@ -1,5 +1,7 @@
 package io.searchbox.snapshot;
 
+import io.searchbox.client.config.ElasticsearchVersion;
+
 /**
  * @author happyprg(hongsgo@gmail.com)
  */
@@ -11,8 +13,8 @@ public class RestoreSnapshot extends AbstractSnapshotAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_restore";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_restore";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/snapshot/SnapshotStatus.java b/jest-common/src/main/java/io/searchbox/snapshot/SnapshotStatus.java
index 1b9163c8..523377ea 100644
--- a/jest-common/src/main/java/io/searchbox/snapshot/SnapshotStatus.java
+++ b/jest-common/src/main/java/io/searchbox/snapshot/SnapshotStatus.java
@@ -1,5 +1,7 @@
 package io.searchbox.snapshot;
 
+import io.searchbox.client.config.ElasticsearchVersion;
+
 /**
  * @author happyprg(hongsgo@gmail.com)
  */
@@ -10,8 +12,8 @@ public class SnapshotStatus extends AbstractSnapshotAction {
     }
 
     @Override
-    protected String buildURI() {
-        return super.buildURI() + "/_status";
+    protected String buildURI(ElasticsearchVersion elasticsearchVersion) {
+        return super.buildURI(elasticsearchVersion) + "/_status";
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/strings/StringUtils.java b/jest-common/src/main/java/io/searchbox/strings/StringUtils.java
index 5e18bac0..5a2d0628 100644
--- a/jest-common/src/main/java/io/searchbox/strings/StringUtils.java
+++ b/jest-common/src/main/java/io/searchbox/strings/StringUtils.java
@@ -15,4 +15,8 @@ public class StringUtils {
         }
         return true;
     }
+
+    public static boolean isNotBlank(final CharSequence cs) {
+        return !isBlank(cs);
+    }
 }
diff --git a/jest-droid/src/main/java/com/searchly/jestdroid/JestDroidClient.java b/jest-droid/src/main/java/com/searchly/jestdroid/JestDroidClient.java
index edc5f303..22ec0b65 100644
--- a/jest-droid/src/main/java/com/searchly/jestdroid/JestDroidClient.java
+++ b/jest-droid/src/main/java/com/searchly/jestdroid/JestDroidClient.java
@@ -8,6 +8,7 @@ import io.searchbox.client.AbstractJestClient;
 import io.searchbox.client.JestClient;
 import io.searchbox.client.JestResult;
 import io.searchbox.client.JestResultHandler;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.client.config.exception.CouldNotConnectException;
 import org.apache.http.HttpEntityEnclosingRequest;
 import org.apache.http.HttpResponse;
@@ -46,7 +47,7 @@ public class JestDroidClient extends AbstractJestClient implements JestClient {
     }
 
     public <T extends JestResult> T execute(Action<T> clientRequest, RequestConfig requestConfig) throws IOException {
-        String elasticSearchRestUrl = getRequestURL(getNextServer(), clientRequest.getURI());
+        String elasticSearchRestUrl = getRequestURL(getNextServer(), clientRequest.getURI(ElasticsearchVersion.UNKNOWN));
         HttpUriRequest request = constructHttpMethod(clientRequest.getRestMethodName(), elasticSearchRestUrl, clientRequest.getData(gson), requestConfig);
 
         // add headers added to action
diff --git a/jest/src/main/java/io/searchbox/client/JestClientFactory.java b/jest/src/main/java/io/searchbox/client/JestClientFactory.java
index c3abda10..8e603fe4 100755
--- a/jest/src/main/java/io/searchbox/client/JestClientFactory.java
+++ b/jest/src/main/java/io/searchbox/client/JestClientFactory.java
@@ -103,6 +103,8 @@ public class JestClientFactory {
             client.setHttpClientContextTemplate(createPreemptiveAuthContext(preemptiveAuthTargetHosts));
         }
 
+        client.setElasticsearchVersion(httpClientConfig.getElasticsearchVersion());
+
         return client;
     }
 
diff --git a/jest/src/main/java/io/searchbox/client/config/HttpClientConfig.java b/jest/src/main/java/io/searchbox/client/config/HttpClientConfig.java
index 5af1789c..9e7a48cf 100644
--- a/jest/src/main/java/io/searchbox/client/config/HttpClientConfig.java
+++ b/jest/src/main/java/io/searchbox/client/config/HttpClientConfig.java
@@ -43,6 +43,7 @@ public class HttpClientConfig extends ClientConfig {
     private final SchemeIOSessionStrategy httpIOSessionStrategy;
     private final SchemeIOSessionStrategy httpsIOSessionStrategy;
     private Set<HttpHost> preemptiveAuthTargetHosts;
+    private final ElasticsearchVersion elasticsearchVersion;
 
     public HttpClientConfig(Builder builder) {
         super(builder);
@@ -57,6 +58,7 @@ public class HttpClientConfig extends ClientConfig {
         this.httpIOSessionStrategy = builder.httpIOSessionStrategy;
         this.httpsIOSessionStrategy = builder.httpsIOSessionStrategy;
         this.preemptiveAuthTargetHosts = builder.preemptiveAuthTargetHosts;
+        this.elasticsearchVersion = builder.elasticsearchVersion;
     }
 
     public Map<HttpRoute, Integer> getMaxTotalConnectionPerRoute() {
@@ -103,6 +105,10 @@ public class HttpClientConfig extends ClientConfig {
         return preemptiveAuthTargetHosts;
     }
 
+    public ElasticsearchVersion getElasticsearchVersion() {
+        return elasticsearchVersion;
+    }
+
     public static class Builder extends ClientConfig.AbstractBuilder<HttpClientConfig, Builder> {
 
         private Integer maxTotalConnection;
@@ -116,6 +122,7 @@ public class HttpClientConfig extends ClientConfig {
         private SchemeIOSessionStrategy httpIOSessionStrategy;
         private SchemeIOSessionStrategy httpsIOSessionStrategy;
         private Set<HttpHost> preemptiveAuthTargetHosts = Collections.emptySet();
+        private ElasticsearchVersion elasticsearchVersion = ElasticsearchVersion.UNKNOWN;
 
         public Builder(HttpClientConfig httpClientConfig) {
             super(httpClientConfig);
@@ -279,6 +286,11 @@ public class HttpClientConfig extends ClientConfig {
             return this;
         }
 
+        public Builder elasticsearchVersion(ElasticsearchVersion elasticsearchVersion) {
+            this.elasticsearchVersion = elasticsearchVersion;
+            return this;
+        }
+
         public HttpClientConfig build() {
             // Lazily initialize if necessary, as the call can be expensive when done eagerly.
             if (this.sslSocketFactory == null) {
diff --git a/jest/src/main/java/io/searchbox/client/http/JestHttpClient.java b/jest/src/main/java/io/searchbox/client/http/JestHttpClient.java
index 6f4c1b0a..76c3d6ac 100755
--- a/jest/src/main/java/io/searchbox/client/http/JestHttpClient.java
+++ b/jest/src/main/java/io/searchbox/client/http/JestHttpClient.java
@@ -5,6 +5,7 @@ import io.searchbox.action.Action;
 import io.searchbox.client.AbstractJestClient;
 import io.searchbox.client.JestResult;
 import io.searchbox.client.JestResultHandler;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.client.config.exception.CouldNotConnectException;
 import io.searchbox.client.http.apache.HttpDeleteWithEntity;
 import io.searchbox.client.http.apache.HttpGetWithEntity;
@@ -50,6 +51,8 @@ public class JestHttpClient extends AbstractJestClient {
 
     private HttpClientContext httpClientContextTemplate;
 
+    private ElasticsearchVersion elasticsearchVersion = ElasticsearchVersion.UNKNOWN;
+
     /**
      * @throws IOException in case of a problem or the connection was aborted during request,
      *                     or in case of a problem while reading the response stream
@@ -112,7 +115,7 @@ public class JestHttpClient extends AbstractJestClient {
     }
 
     protected <T extends JestResult> HttpUriRequest prepareRequest(final Action<T> clientRequest, final RequestConfig requestConfig) {
-        String elasticSearchRestUrl = getRequestURL(getNextServer(), clientRequest.getURI());
+        String elasticSearchRestUrl = getRequestURL(getNextServer(), clientRequest.getURI(elasticsearchVersion));
         HttpUriRequest request = constructHttpMethod(clientRequest.getRestMethodName(), elasticSearchRestUrl, clientRequest.getData(gson), requestConfig);
 
         log.debug("Request method={} url={}", clientRequest.getRestMethodName(), elasticSearchRestUrl);
@@ -243,6 +246,10 @@ public class JestHttpClient extends AbstractJestClient {
         this.httpClientContextTemplate = httpClientContext;
     }
 
+    public void setElasticsearchVersion(ElasticsearchVersion elasticsearchVersion) {
+        this.elasticsearchVersion = elasticsearchVersion;
+    }
+
     protected class DefaultCallback<T extends JestResult> implements FutureCallback<HttpResponse> {
         private final Action<T> clientRequest;
         private final HttpRequest request;


Test patch:
diff --git a/jest-common/src/main/java/io/searchbox/indices/script/CreateStoredScript.java b/jest-common/src/main/java/io/searchbox/indices/script/CreateStoredScript.java
index e294b6d2..6bf42fa3 100644
--- a/jest-common/src/main/java/io/searchbox/indices/script/CreateStoredScript.java
+++ b/jest-common/src/main/java/io/searchbox/indices/script/CreateStoredScript.java
@@ -13,7 +13,6 @@ public class CreateStoredScript extends AbstractStoredScript {
     protected CreateStoredScript(Builder builder) {
         super(builder);
         this.payload = builder.payload;
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/main/java/io/searchbox/indices/script/DeleteStoredScript.java b/jest-common/src/main/java/io/searchbox/indices/script/DeleteStoredScript.java
index 2d02eabd..6e08b922 100644
--- a/jest-common/src/main/java/io/searchbox/indices/script/DeleteStoredScript.java
+++ b/jest-common/src/main/java/io/searchbox/indices/script/DeleteStoredScript.java
@@ -4,7 +4,6 @@ public class DeleteStoredScript extends AbstractStoredScript {
 
     protected DeleteStoredScript(Builder builder) {
         super(builder);
-        setURI(buildURI());
     }
 
     @Override
diff --git a/jest-common/src/test/java/io/searchbox/action/AbstractActionTest.java b/jest-common/src/test/java/io/searchbox/action/AbstractActionTest.java
index 38ed36da..35495b5c 100644
--- a/jest-common/src/test/java/io/searchbox/action/AbstractActionTest.java
+++ b/jest-common/src/test/java/io/searchbox/action/AbstractActionTest.java
@@ -5,6 +5,7 @@ import com.google.gson.JsonObject;
 import com.google.gson.JsonSyntaxException;
 import io.searchbox.annotations.JestId;
 import io.searchbox.client.JestResult;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.core.Delete;
 import io.searchbox.core.Get;
 import io.searchbox.core.Index;
@@ -22,19 +23,20 @@ public class AbstractActionTest {
     @Test
     public void buildRestUrlWithValidParameters() {
         String expected = "twitter/tweet/1";
-        String actual = new Delete.Builder("1").index("twitter").type("tweet").build().buildURI();
+        final Delete build = new Delete.Builder("1").index("twitter").type("tweet").build();
+        String actual = build.buildURI(ElasticsearchVersion.UNKNOWN);
         assertEquals(expected, actual);
     }
 
     @Test
     public void buildUrlWithRequestParameterWithMultipleValues() {
-        Action dummyAction = new DummyAction.Builder()
+        DummyAction dummyAction = new DummyAction.Builder()
                 .setParameter("x", "y")
                 .setParameter("x", "z")
                 .setParameter("x", "q")
                 .setParameter("w", "p")
                 .build();
-        assertEquals("?x=y&x=z&x=q&w=p", dummyAction.getURI());
+        assertEquals("?x=y&x=z&x=q&w=p", dummyAction.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -95,25 +97,21 @@ public class AbstractActionTest {
 
         assertEquals("\"updateData\"", update.getData(null).toString());
         assertEquals("POST", update.getRestMethodName());
-        assertEquals("indexName/indexType/1/_update", update.getURI());
+        assertEquals("indexName/indexType/1/_update", update.getURI(ElasticsearchVersion.UNKNOWN));
 
         assertEquals("\"indexDocumentData\"", indexDocument.getData(null).toString());
         assertEquals("PUT", indexDocument.getRestMethodName());
-        assertEquals("index/type/id", indexDocument.getURI());
+        assertEquals("index/type/id", indexDocument.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getIdFromNullSource() {
-        String expected = null;
-        String actual = AbstractAction.getIdFromSource(null);
-        assertEquals(expected, actual);
+        assertNull(AbstractAction.getIdFromSource(null));
     }
 
     @Test
     public void getIdFromSourceWithoutAnnotation() {
-        String expected = null;
-        String actual = AbstractAction.getIdFromSource("JEST");
-        assertEquals(expected, actual);
+        assertNull(AbstractAction.getIdFromSource("JEST"));
     }
 
     @Test
@@ -125,15 +123,12 @@ public class AbstractActionTest {
 
     @Test
     public void getIdFromSourceWithAnnotationWithNullId() {
-        String expected = null;
-        String actual = AbstractAction.getIdFromSource(new Source("data", null));
-        assertEquals(expected, actual);
+        assertNull(AbstractAction.getIdFromSource(new Source("data", null)));
     }
 
     static class DummyAction extends GenericResultAbstractAction {
         public DummyAction(Builder builder) {
             super(builder);
-            setURI(buildURI());
         }
 
         @Override
diff --git a/jest-common/src/test/java/io/searchbox/cluster/NodesHotThreadsTest.java b/jest-common/src/test/java/io/searchbox/cluster/NodesHotThreadsTest.java
index ad14623d..17fe6dfd 100644
--- a/jest-common/src/test/java/io/searchbox/cluster/NodesHotThreadsTest.java
+++ b/jest-common/src/test/java/io/searchbox/cluster/NodesHotThreadsTest.java
@@ -1,6 +1,6 @@
 package io.searchbox.cluster;
 
-import io.searchbox.action.Action;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,20 +12,19 @@ public class NodesHotThreadsTest {
 
     @Test
     public void testUriGenerationWithAllNodes() {
-        Action action = new NodesHotThreads.Builder().build();
-        assertEquals("/_nodes/_all/hot_threads", action.getURI());
+        NodesHotThreads action = new NodesHotThreads.Builder().build();
+        assertEquals("/_nodes/_all/hot_threads", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testUriGenerationWithSingleNode() {
-        Action action = new NodesHotThreads.Builder().addNode("Pony").build();
-        assertEquals("/_nodes/Pony/hot_threads", action.getURI());
+        NodesHotThreads action = new NodesHotThreads.Builder().addNode("Pony").build();
+        assertEquals("/_nodes/Pony/hot_threads", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testUriGenerationWithSingleNodeAndParameter() {
-        Action action = new NodesHotThreads.Builder().addNode("Pony").interval("100ms").build();
-        assertEquals("/_nodes/Pony/hot_threads?interval=100ms", action.getURI());
+        NodesHotThreads action = new NodesHotThreads.Builder().addNode("Pony").interval("100ms").build();
+        assertEquals("/_nodes/Pony/hot_threads?interval=100ms", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
-
 }
diff --git a/jest-common/src/test/java/io/searchbox/cluster/NodesInfoTest.java b/jest-common/src/test/java/io/searchbox/cluster/NodesInfoTest.java
index 4035fa14..7f767e9d 100644
--- a/jest-common/src/test/java/io/searchbox/cluster/NodesInfoTest.java
+++ b/jest-common/src/test/java/io/searchbox/cluster/NodesInfoTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.cluster;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,37 +13,37 @@ public class NodesInfoTest {
     @Test
     public void getURIWithoutNodeAndInfo() {
         NodesInfo nodesInfo = new NodesInfo.Builder().build();
-        assertEquals("/_nodes/_all", nodesInfo.getURI());
+        assertEquals("/_nodes/_all", nodesInfo.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyOneNode() {
         NodesInfo nodesInfo = new NodesInfo.Builder().addNode("twitter").build();
-        assertEquals("/_nodes/twitter", nodesInfo.getURI());
+        assertEquals("/_nodes/twitter", nodesInfo.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOneNodeAndOneInfo() {
         NodesInfo nodesInfo = new NodesInfo.Builder().addNode("twitter").withOs().build();
-        assertEquals("/_nodes/twitter/os", nodesInfo.getURI());
+        assertEquals("/_nodes/twitter/os", nodesInfo.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyOneType() {
         NodesInfo nodesInfo = new NodesInfo.Builder().withOs().build();
-        assertEquals("/_nodes/_all/os", nodesInfo.getURI());
+        assertEquals("/_nodes/_all/os", nodesInfo.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyMultipleNode() {
         NodesInfo nodesInfo = new NodesInfo.Builder().addNode("twitter").addNode("searchbox").build();
-        assertEquals("/_nodes/twitter,searchbox", nodesInfo.getURI());
+        assertEquals("/_nodes/twitter,searchbox", nodesInfo.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyMultipleType() {
         NodesInfo nodesInfo = new NodesInfo.Builder().withOs().withProcess().build();
-        assertEquals("/_nodes/_all/os,process", nodesInfo.getURI());
+        assertEquals("/_nodes/_all/os,process", nodesInfo.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -54,7 +55,7 @@ public class NodesInfoTest {
                 .withProcess()
                 .withSettings()
                 .build();
-        assertEquals("/_nodes/twitter,jest/os,process,settings", nodesInfo.getURI());
+        assertEquals("/_nodes/twitter,jest/os,process,settings", nodesInfo.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
 }
diff --git a/jest-common/src/test/java/io/searchbox/cluster/NodesShutdownTest.java b/jest-common/src/test/java/io/searchbox/cluster/NodesShutdownTest.java
index 168c83b7..d8496ea1 100644
--- a/jest-common/src/test/java/io/searchbox/cluster/NodesShutdownTest.java
+++ b/jest-common/src/test/java/io/searchbox/cluster/NodesShutdownTest.java
@@ -1,6 +1,6 @@
 package io.searchbox.cluster;
 
-import io.searchbox.action.Action;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,26 +12,25 @@ public class NodesShutdownTest {
 
     @Test
     public void testBuildURI() throws Exception {
-        Action action = new NodesShutdown.Builder().build();
-        assertEquals("/_nodes/_all/_shutdown", action.getURI());
+        NodesShutdown action = new NodesShutdown.Builder().build();
+        assertEquals("/_nodes/_all/_shutdown", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testBuildURIWithDelay() throws Exception {
-        Action action = new NodesShutdown.Builder().delay("5s").build();
-        assertEquals("/_nodes/_all/_shutdown?delay=5s", action.getURI());
+        NodesShutdown action = new NodesShutdown.Builder().delay("5s").build();
+        assertEquals("/_nodes/_all/_shutdown?delay=5s", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testBuildURIWithNodes() throws Exception {
-        Action action = new NodesShutdown.Builder().addNode("_local").build();
-        assertEquals("/_nodes/_local/_shutdown", action.getURI());
+        NodesShutdown action = new NodesShutdown.Builder().addNode("_local").build();
+        assertEquals("/_nodes/_local/_shutdown", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testBuildURIWithNodeAttributeWildcard() throws Exception {
-        Action action = new NodesShutdown.Builder().addNode("ra*:2*").build();
-        assertEquals("/_nodes/ra*:2*/_shutdown", action.getURI());
+        NodesShutdown action = new NodesShutdown.Builder().addNode("ra*:2*").build();
+        assertEquals("/_nodes/ra*:2*/_shutdown", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
-
 }
diff --git a/jest-common/src/test/java/io/searchbox/cluster/NodesStatsTest.java b/jest-common/src/test/java/io/searchbox/cluster/NodesStatsTest.java
index 078c78f8..a555b742 100644
--- a/jest-common/src/test/java/io/searchbox/cluster/NodesStatsTest.java
+++ b/jest-common/src/test/java/io/searchbox/cluster/NodesStatsTest.java
@@ -1,6 +1,6 @@
 package io.searchbox.cluster;
 
-import io.searchbox.action.Action;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,19 +12,19 @@ public class NodesStatsTest {
 
     @Test
     public void testUriGeneration() throws Exception {
-        Action action = new NodesStats.Builder()
+        NodesStats action = new NodesStats.Builder()
                 .build();
-        assertEquals("/_nodes/_all/stats", action.getURI());
+        assertEquals("/_nodes/_all/stats", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testUriGenerationWithSingleNode() throws Exception {
-        Action action = new NodesStats.Builder()
+        NodesStats action = new NodesStats.Builder()
                 .addNode("james")
                 .withOs()
                 .withJvm()
                 .build();
-        assertEquals("/_nodes/james/stats/os,jvm", action.getURI());
+        assertEquals("/_nodes/james/stats/os,jvm", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
 }
diff --git a/jest-common/src/test/java/io/searchbox/cluster/PendingClusterTasksTest.java b/jest-common/src/test/java/io/searchbox/cluster/PendingClusterTasksTest.java
index 8f630808..44a7fcbf 100644
--- a/jest-common/src/test/java/io/searchbox/cluster/PendingClusterTasksTest.java
+++ b/jest-common/src/test/java/io/searchbox/cluster/PendingClusterTasksTest.java
@@ -1,6 +1,6 @@
 package io.searchbox.cluster;
 
-import io.searchbox.action.Action;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -8,7 +8,7 @@ import static org.junit.Assert.assertEquals;
 public class PendingClusterTasksTest {
     @Test
     public void testUriGeneration() {
-        Action action = new PendingClusterTasks.Builder().build();
-        assertEquals("/_cluster/pending_tasks", action.getURI());
+        PendingClusterTasks action = new PendingClusterTasks.Builder().build();
+        assertEquals("/_cluster/pending_tasks", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/cluster/RerouteTest.java b/jest-common/src/test/java/io/searchbox/cluster/RerouteTest.java
index 316bde3b..8fc4a9db 100644
--- a/jest-common/src/test/java/io/searchbox/cluster/RerouteTest.java
+++ b/jest-common/src/test/java/io/searchbox/cluster/RerouteTest.java
@@ -1,6 +1,7 @@
 package io.searchbox.cluster;
 
 import com.google.gson.Gson;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.cluster.reroute.RerouteAllocateReplica;
 import io.searchbox.cluster.reroute.RerouteCancel;
 import io.searchbox.cluster.reroute.RerouteMove;
@@ -24,7 +25,7 @@ public class RerouteTest {
         moveCommands.add(new RerouteAllocateReplica("index3", 1, "node3"));
 
         Reroute reroute = new Reroute.Builder(moveCommands).build();
-        assertEquals("/_cluster/reroute", reroute.getURI());
+        assertEquals("/_cluster/reroute", reroute.getURI(ElasticsearchVersion.UNKNOWN));
         assertEquals("POST", reroute.getRestMethodName());
 
         String expectedData = "{ \"commands\": [" +
diff --git a/jest-common/src/test/java/io/searchbox/cluster/StateTest.java b/jest-common/src/test/java/io/searchbox/cluster/StateTest.java
index e0835971..78e6a295 100644
--- a/jest-common/src/test/java/io/searchbox/cluster/StateTest.java
+++ b/jest-common/src/test/java/io/searchbox/cluster/StateTest.java
@@ -1,6 +1,6 @@
 package io.searchbox.cluster;
 
-import io.searchbox.action.Action;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,17 +12,17 @@ public class StateTest {
 
     @Test
     public void testUriGeneration() {
-        Action action = new State.Builder().build();
-        assertEquals("/_cluster/state", action.getURI());
+        State action = new State.Builder().build();
+        assertEquals("/_cluster/state", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testUriGenerationWithOptionalFields() {
-        Action action = new State.Builder()
+        State action = new State.Builder()
                 .withBlocks()
                 .withMetadata()
                 .build();
-        assertEquals("/_cluster/state/blocks,metadata", action.getURI());
+        assertEquals("/_cluster/state/blocks,metadata", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
 }
diff --git a/jest-common/src/test/java/io/searchbox/cluster/StatsTest.java b/jest-common/src/test/java/io/searchbox/cluster/StatsTest.java
index de90a7a5..a2e23ef3 100644
--- a/jest-common/src/test/java/io/searchbox/cluster/StatsTest.java
+++ b/jest-common/src/test/java/io/searchbox/cluster/StatsTest.java
@@ -1,6 +1,6 @@
 package io.searchbox.cluster;
 
-import io.searchbox.action.Action;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -8,16 +8,16 @@ import static org.junit.Assert.assertEquals;
 public class StatsTest {
     @Test
     public void testUriGeneration() {
-        Action action = new Stats.Builder().build();
-        assertEquals("/_cluster/stats/nodes/_all", action.getURI());
+        Stats action = new Stats.Builder().build();
+        assertEquals("/_cluster/stats/nodes/_all", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testUriGenerationWithSpecificNodes() {
-        Action action = new Stats.Builder()
+        Stats action = new Stats.Builder()
                 .addNode("test1")
                 .addNode("test2")
                 .build();
-        assertEquals("/_cluster/stats/nodes/test1,test2", action.getURI());
+        assertEquals("/_cluster/stats/nodes/test1,test2", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/cluster/TasksInformationTest.java b/jest-common/src/test/java/io/searchbox/cluster/TasksInformationTest.java
index 238cc263..3a01b39e 100644
--- a/jest-common/src/test/java/io/searchbox/cluster/TasksInformationTest.java
+++ b/jest-common/src/test/java/io/searchbox/cluster/TasksInformationTest.java
@@ -1,6 +1,6 @@
 package io.searchbox.cluster;
 
-import io.searchbox.action.Action;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
@@ -9,13 +9,13 @@ public class TasksInformationTest {
 
     @Test
     public void testUriGeneration() {
-        Action action = new TasksInformation.Builder().build();
-        assertEquals("_tasks", action.getURI());
+        TasksInformation action = new TasksInformation.Builder().build();
+        assertEquals("_tasks", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testUriGenerationSpecificTask() {
-        Action action = new TasksInformation.Builder().task("node_id:task_id").build();
-        assertEquals("_tasks/node_id:task_id", action.getURI());
+        TasksInformation action = new TasksInformation.Builder().task("node_id:task_id").build();
+        assertEquals("_tasks/node_id:task_id", action.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
\ No newline at end of file
diff --git a/jest-common/src/test/java/io/searchbox/core/BulkTest.java b/jest-common/src/test/java/io/searchbox/core/BulkTest.java
index 0b3776aa..c4a8f98a 100644
--- a/jest-common/src/test/java/io/searchbox/core/BulkTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/BulkTest.java
@@ -5,6 +5,7 @@ import static org.junit.Assert.assertEquals;
 import java.util.HashMap;
 import java.util.Map;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.json.JSONException;
 import org.junit.Test;
 import org.skyscreamer.jsonassert.JSONAssert;
@@ -102,14 +103,14 @@ public class BulkTest {
     @Test
     public void testUris() {
         Bulk bulkWitIndex = new Bulk.Builder().defaultIndex("twitter").build();
-        assertEquals("twitter/_bulk", bulkWitIndex.getURI());
+        assertEquals("twitter/_bulk", bulkWitIndex.getURI(ElasticsearchVersion.UNKNOWN));
 
         Bulk bulkWitIndexAndType = new Bulk.Builder().defaultIndex("twitter").defaultType("tweet").build();
-        assertEquals("twitter/tweet/_bulk", bulkWitIndexAndType.getURI());
+        assertEquals("twitter/tweet/_bulk", bulkWitIndexAndType.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     private void executeAsserts(Bulk bulk) {
         assertEquals("POST", bulk.getRestMethodName());
-        assertEquals("/_bulk", bulk.getURI());
+        assertEquals("/_bulk", bulk.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/core/CatAliasesBuilderTest.java b/jest-common/src/test/java/io/searchbox/core/CatAliasesBuilderTest.java
index f16715cc..c0319fd8 100644
--- a/jest-common/src/test/java/io/searchbox/core/CatAliasesBuilderTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/CatAliasesBuilderTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -18,18 +19,18 @@ public class CatAliasesBuilderTest {
     @Test
     public void shouldGenerateValidUriWhenIndexNotGiven() {
         Cat cat = new Cat.AliasesBuilder().build();
-        assertEquals("_cat/aliases/_all", cat.getURI());
+        assertEquals("_cat/aliases/_all", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenIndexGiven() {
         Cat cat = new Cat.AliasesBuilder().addIndex("testIndex").build();
-        assertEquals("_cat/aliases/testIndex", cat.getURI());
+        assertEquals("_cat/aliases/testIndex", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenParameterGiven() {
         Cat cat = new Cat.AliasesBuilder().setParameter("v", "true").build();
-        assertEquals("_cat/aliases/_all?v=true", cat.getURI());
+        assertEquals("_cat/aliases/_all?v=true", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/core/CatAllocationBuilderTest.java b/jest-common/src/test/java/io/searchbox/core/CatAllocationBuilderTest.java
index 6a012145..cfadb944 100644
--- a/jest-common/src/test/java/io/searchbox/core/CatAllocationBuilderTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/CatAllocationBuilderTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -15,30 +16,30 @@ public class CatAllocationBuilderTest {
     @Test
     public void shouldGenerateValidUriWhenIndexNotGiven() {
         Cat cat = new Cat.AllocationBuilder().build();
-        assertEquals("_cat/allocation", cat.getURI());
+        assertEquals("_cat/allocation", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenSingleNodeGiven() {
         Cat cat = new Cat.AllocationBuilder().addNode("testNode").build();
-        assertEquals("_cat/allocation/testNode", cat.getURI());
+        assertEquals("_cat/allocation/testNode", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenNodesGiven() {
         Cat cat = new Cat.AllocationBuilder().addNode("testNode1").addNode("testNode2").build();
-        assertEquals("_cat/allocation/testNode1%2CtestNode2", cat.getURI());
+        assertEquals("_cat/allocation/testNode1%2CtestNode2", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenParameterGiven() {
         Cat cat = new Cat.AllocationBuilder().setParameter("v", "true").build();
-        assertEquals("_cat/allocation?v=true", cat.getURI());
+        assertEquals("_cat/allocation?v=true", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenHeadersParameterGiven() {
         Cat cat = new Cat.AllocationBuilder().setParameter("h", "shards,disk.indices,disk.used").build();
-        assertEquals("_cat/allocation?h=shards%2Cdisk.indices%2Cdisk.used", cat.getURI());
+        assertEquals("_cat/allocation?h=shards%2Cdisk.indices%2Cdisk.used", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/core/CatIndicesBuilderTest.java b/jest-common/src/test/java/io/searchbox/core/CatIndicesBuilderTest.java
index ebbf6ebf..c0e60f06 100644
--- a/jest-common/src/test/java/io/searchbox/core/CatIndicesBuilderTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/CatIndicesBuilderTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -18,24 +19,24 @@ public class CatIndicesBuilderTest {
     @Test
     public void shouldGenerateValidUriWhenIndexNotGiven() {
         Cat cat = new Cat.IndicesBuilder().build();
-        assertEquals("_cat/indices/_all", cat.getURI());
+        assertEquals("_cat/indices/_all", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenIndexGiven() {
         Cat cat = new Cat.IndicesBuilder().addIndex("testIndex").build();
-        assertEquals("_cat/indices/testIndex", cat.getURI());
+        assertEquals("_cat/indices/testIndex", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenIndexAndTypeGiven() {
         Cat cat = new Cat.IndicesBuilder().addIndex("testIndex").addType("testType").build();
-        assertEquals("_cat/indices/testIndex/testType", cat.getURI());
+        assertEquals("_cat/indices/testIndex/testType", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenParameterGiven() {
         Cat cat = new Cat.IndicesBuilder().setParameter("v", "true").build();
-        assertEquals("_cat/indices/_all?v=true", cat.getURI());
+        assertEquals("_cat/indices/_all?v=true", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/core/CatNodesBuilderTest.java b/jest-common/src/test/java/io/searchbox/core/CatNodesBuilderTest.java
index d91b2ae4..f26fe37d 100644
--- a/jest-common/src/test/java/io/searchbox/core/CatNodesBuilderTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/CatNodesBuilderTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -15,12 +16,12 @@ public class CatNodesBuilderTest {
     @Test
     public void shouldGenerateValidUriWhenIndexNotGiven() {
         Cat cat = new Cat.NodesBuilder().build();
-        assertEquals("_cat/nodes", cat.getURI());
+        assertEquals("_cat/nodes", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenParameterGiven() {
         Cat cat = new Cat.NodesBuilder().setParameter("v", "true").build();
-        assertEquals("_cat/nodes?v=true", cat.getURI());
+        assertEquals("_cat/nodes?v=true", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/core/CatSegmentsBuilderTest.java b/jest-common/src/test/java/io/searchbox/core/CatSegmentsBuilderTest.java
index cf5fb4f1..f01681da 100644
--- a/jest-common/src/test/java/io/searchbox/core/CatSegmentsBuilderTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/CatSegmentsBuilderTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -19,31 +20,31 @@ public class CatSegmentsBuilderTest {
     @Test
     public void shouldGenerateValidUriWhenIndexNotGiven() {
         Cat cat = new Cat.SegmentsBuilder().build();
-        assertEquals("_cat/segments", cat.getURI());
+        assertEquals("_cat/segments", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenSingleIndexGiven() {
         Cat cat = new Cat.SegmentsBuilder().addIndex("testIndex").build();
-        assertEquals("_cat/segments/testIndex", cat.getURI());
+        assertEquals("_cat/segments/testIndex", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenIndicesGiven() {
         Cat cat = new Cat.SegmentsBuilder().addIndex("testIndex1").addIndex("testIndex2").build();
-        assertEquals("_cat/segments/testIndex1%2CtestIndex2", cat.getURI());
+        assertEquals("_cat/segments/testIndex1%2CtestIndex2", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenParameterGiven() {
         Cat cat = new Cat.SegmentsBuilder().setParameter("v", "true").build();
-        assertEquals("_cat/segments?v=true", cat.getURI());
+        assertEquals("_cat/segments?v=true", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenHeadersParameterGiven() {
         Cat cat = new Cat.SegmentsBuilder().setParameter("h", "index,shard,prirep,segment,docs.count").build();
-        assertEquals("_cat/segments?h=index%2Cshard%2Cprirep%2Csegment%2Cdocs.count", cat.getURI());
+        assertEquals("_cat/segments?h=index%2Cshard%2Cprirep%2Csegment%2Cdocs.count", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
 }
diff --git a/jest-common/src/test/java/io/searchbox/core/CatShardsBuilderTest.java b/jest-common/src/test/java/io/searchbox/core/CatShardsBuilderTest.java
index 7b54f44c..6f325455 100644
--- a/jest-common/src/test/java/io/searchbox/core/CatShardsBuilderTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/CatShardsBuilderTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -15,18 +16,18 @@ public class CatShardsBuilderTest {
     @Test
     public void shouldGenerateValidUriWhenIndexNotGiven() {
         Cat cat = new Cat.ShardsBuilder().build();
-        assertEquals("_cat/shards", cat.getURI());
+        assertEquals("_cat/shards", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenIndexGiven() {
         Cat cat = new Cat.ShardsBuilder().addIndex("testIndex").build();
-        assertEquals("_cat/shards/testIndex", cat.getURI());
+        assertEquals("_cat/shards/testIndex", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void shouldGenerateValidUriWhenParameterGiven() {
         Cat cat = new Cat.ShardsBuilder().setParameter("v", "true").build();
-        assertEquals("_cat/shards?v=true", cat.getURI());
+        assertEquals("_cat/shards?v=true", cat.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/core/CountTest.java b/jest-common/src/test/java/io/searchbox/core/CountTest.java
index 6b2c1e96..7a0b5730 100644
--- a/jest-common/src/test/java/io/searchbox/core/CountTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/CountTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -14,25 +15,25 @@ public class CountTest {
     @Test
     public void getURIWithoutIndexAndType() {
         Count count = new Count.Builder().build();
-        assertEquals("_all/_count", count.getURI());
+        assertEquals("_all/_count", count.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyOneIndex() {
         Count count = new Count.Builder().addIndex("twitter").build();
-        assertEquals("twitter/_count", count.getURI());
+        assertEquals("twitter/_count", count.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOneIndexAndOneType() {
         Count count = new Count.Builder().addIndex("twitter").addType("tweet").build();
-        assertEquals("twitter/tweet/_count", count.getURI());
+        assertEquals("twitter/tweet/_count", count.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyMultipleIndex() {
         Count count = new Count.Builder().addIndex("twitter").addIndex("searchbox").build();
-        assertEquals("twitter%2Csearchbox/_count", count.getURI());
+        assertEquals("twitter%2Csearchbox/_count", count.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -81,7 +82,7 @@ public class CountTest {
                 .addType("tweet")
                 .addType("jest")
                 .build();
-        assertEquals("twitter%2Csearchbox/tweet%2Cjest/_count", count.getURI());
+        assertEquals("twitter%2Csearchbox/tweet%2Cjest/_count", count.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
 }
diff --git a/jest-common/src/test/java/io/searchbox/core/DeleteByQueryTest.java b/jest-common/src/test/java/io/searchbox/core/DeleteByQueryTest.java
index e0e2627e..c44e0d19 100644
--- a/jest-common/src/test/java/io/searchbox/core/DeleteByQueryTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/DeleteByQueryTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,28 +13,28 @@ public class DeleteByQueryTest {
 
     @Test
     public void getURIWithoutIndexAndType() {
-        assertEquals("_all/_delete_by_query", new DeleteByQuery.Builder(null).build().getURI());
+        assertEquals("_all/_delete_by_query", new DeleteByQuery.Builder(null).build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyOneIndex() {
-        assertEquals("twitter/_delete_by_query", new DeleteByQuery.Builder(null).addIndex("twitter").build().getURI());
+        assertEquals("twitter/_delete_by_query", new DeleteByQuery.Builder(null).addIndex("twitter").build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyMultipleType() {
-        assertEquals("_all/tweet%2Cjest/_delete_by_query", new DeleteByQuery.Builder(null).addType("tweet").addType("jest").build().getURI());
+        assertEquals("_all/tweet%2Cjest/_delete_by_query", new DeleteByQuery.Builder(null).addType("tweet").addType("jest").build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOneIndexAndOneType() {
-        assertEquals("twitter/tweet/_delete_by_query", new DeleteByQuery.Builder(null).addIndex("twitter").addType("tweet").build().getURI());
+        assertEquals("twitter/tweet/_delete_by_query", new DeleteByQuery.Builder(null).addIndex("twitter").addType("tweet").build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyMultipleIndex() {
         assertEquals("twitter%2Csearchbox/_delete_by_query",
-                new DeleteByQuery.Builder(null).addIndex("twitter").addIndex("searchbox").build().getURI());
+                new DeleteByQuery.Builder(null).addIndex("twitter").addIndex("searchbox").build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -43,8 +44,7 @@ public class DeleteByQueryTest {
                 .addIndex("searchbox")
                 .addType("tweet")
                 .addType("jest")
-                .build()
-                .getURI());
+                .build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/core/DeleteTest.java b/jest-common/src/test/java/io/searchbox/core/DeleteTest.java
index 1923e0ba..18c6412e 100644
--- a/jest-common/src/test/java/io/searchbox/core/DeleteTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/DeleteTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.params.Parameters;
 import org.junit.Test;
 
@@ -46,7 +47,7 @@ public class DeleteTest {
                 .type("tweet")
                 .build();
         assertEquals("DELETE", delete.getRestMethodName());
-        assertEquals("twitter/tweet/1", delete.getURI());
+        assertEquals("twitter/tweet/1", delete.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -57,6 +58,6 @@ public class DeleteTest {
                 .setParameter(Parameters.VERSION, 1)
                 .build();
         assertEquals("DELETE", delete.getRestMethodName());
-        assertEquals("twitter/tweet/1?version=1", delete.getURI());
+        assertEquals("twitter/tweet/1?version=1", delete.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/core/ExplainTest.java b/jest-common/src/test/java/io/searchbox/core/ExplainTest.java
index cae3d0a7..bd7540e9 100644
--- a/jest-common/src/test/java/io/searchbox/core/ExplainTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/ExplainTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -14,7 +15,7 @@ public class ExplainTest {
     public void explain() {
         Explain explain = new Explain.Builder("twitter", "tweet", "1", "query").build();
         assertEquals("POST", explain.getRestMethodName());
-        assertEquals("twitter/tweet/1/_explain", explain.getURI());
+        assertEquals("twitter/tweet/1/_explain", explain.getURI(ElasticsearchVersion.UNKNOWN));
         assertEquals("query", explain.getData(null));
     }
 
diff --git a/jest-common/src/test/java/io/searchbox/core/GetTest.java b/jest-common/src/test/java/io/searchbox/core/GetTest.java
index e7da94ce..446fb583 100644
--- a/jest-common/src/test/java/io/searchbox/core/GetTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/GetTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -15,6 +16,6 @@ public class GetTest {
     public void getDocument() {
         Get get =  new Get.Builder("twitter", "1").type("tweet").build();
         assertEquals("GET", get.getRestMethodName());
-        assertEquals("twitter/tweet/1", get.getURI());
+        assertEquals("twitter/tweet/1", get.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/core/IndexTest.java b/jest-common/src/test/java/io/searchbox/core/IndexTest.java
index 6766fdeb..a8cb1ab6 100644
--- a/jest-common/src/test/java/io/searchbox/core/IndexTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/IndexTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.params.Parameters;
 import org.junit.Test;
 
@@ -17,7 +18,7 @@ public class IndexTest {
     public void indexDocument() {
         Index index = new Index.Builder(new Object()).index("twitter").type("tweet").id("1").build();
         assertEquals("PUT", index.getRestMethodName());
-        assertEquals("twitter/tweet/1", index.getURI());
+        assertEquals("twitter/tweet/1", index.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -29,14 +30,14 @@ public class IndexTest {
                 .setParameter(Parameters.VERSION, 3)
                 .build();
         assertEquals("PUT", index.getRestMethodName());
-        assertEquals("twitter/tweet/1?version=3", index.getURI());
+        assertEquals("twitter/tweet/1?version=3", index.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void indexDocumentWithoutId() {
         Index index = new Index.Builder(new Object()).index("twitter").type("tweet").build();
         assertEquals("POST", index.getRestMethodName());
-        assertEquals("twitter/tweet", index.getURI());
+        assertEquals("twitter/tweet", index.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/core/MultiGetTest.java b/jest-common/src/test/java/io/searchbox/core/MultiGetTest.java
index 30705a55..51664030 100644
--- a/jest-common/src/test/java/io/searchbox/core/MultiGetTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/MultiGetTest.java
@@ -5,6 +5,7 @@ import static org.junit.Assert.assertNotEquals;
 
 import java.util.Arrays;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.json.JSONException;
 import org.junit.Test;
 import org.skyscreamer.jsonassert.JSONAssert;
@@ -25,7 +26,7 @@ public class MultiGetTest {
         MultiGet get = new MultiGet.Builder.ByDoc(Arrays.asList(doc1, doc2, doc3)).build();
 
         assertEquals("POST", get.getRestMethodName());
-        assertEquals("/_mget", get.getURI());
+        assertEquals("/_mget", get.getURI(ElasticsearchVersion.UNKNOWN));
         JSONAssert.assertEquals("{\"docs\":[" +
                 "{\"_index\":\"twitter\",\"_type\":\"tweet\",\"_id\":\"1\"}," +
                 "{\"_index\":\"twitter\",\"_type\":\"tweet\",\"_id\":\"2\"}," +
@@ -54,7 +55,7 @@ public class MultiGetTest {
         MultiGet get = new MultiGet.Builder.ById("twitter", "tweet").addId(Arrays.asList("1", "2", "3")).build();
 
         assertEquals("POST", get.getRestMethodName());
-        assertEquals("twitter/tweet/_mget", get.getURI());
+        assertEquals("twitter/tweet/_mget", get.getURI(ElasticsearchVersion.UNKNOWN));
         JSONAssert.assertEquals("{\"ids\":[\"1\",\"2\",\"3\"]}", get.getData(new Gson()), false);
     }
 
diff --git a/jest-common/src/test/java/io/searchbox/core/MultiSearchTest.java b/jest-common/src/test/java/io/searchbox/core/MultiSearchTest.java
index 74035cd0..878158d4 100644
--- a/jest-common/src/test/java/io/searchbox/core/MultiSearchTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/MultiSearchTest.java
@@ -2,6 +2,7 @@ package io.searchbox.core;
 
 import com.google.gson.Gson;
 import com.google.gson.JsonParser;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.json.JSONException;
 import org.junit.Test;
 import org.skyscreamer.jsonassert.JSONAssert;
@@ -22,7 +23,7 @@ public class MultiSearchTest {
         MultiSearch multiSearch = new MultiSearch.Builder(search).build();
 
         assertEquals("POST", multiSearch.getRestMethodName());
-        assertEquals("/_msearch", multiSearch.getURI());
+        assertEquals("/_msearch", multiSearch.getURI(ElasticsearchVersion.UNKNOWN));
         assertEquals("application/x-ndjson", multiSearch.getHeader("Content-Type"));
     }
 
@@ -35,7 +36,7 @@ public class MultiSearchTest {
         MultiSearch multiSearch = new MultiSearch.Builder(search).build();
 
         assertEquals("POST", multiSearch.getRestMethodName());
-        assertEquals("/_msearch", multiSearch.getURI());
+        assertEquals("/_msearch", multiSearch.getURI(ElasticsearchVersion.UNKNOWN));
         JSONAssert.assertEquals(expectedData, multiSearch.getData(null).toString(), false);
     }
 
@@ -50,7 +51,7 @@ public class MultiSearchTest {
         MultiSearch multiSearch = new MultiSearch.Builder(search).build();
 
         assertEquals("POST", multiSearch.getRestMethodName());
-        assertEquals("/_msearch", multiSearch.getURI());
+        assertEquals("/_msearch", multiSearch.getURI(ElasticsearchVersion.UNKNOWN));
         JSONAssert.assertEquals(expectedData, multiSearch.getData(null).toString(), false);
     }
 
@@ -68,7 +69,7 @@ public class MultiSearchTest {
         MultiSearch multiSearch = new MultiSearch.Builder(search).addSearch(search2).build();
 
         assertEquals("POST", multiSearch.getRestMethodName());
-        assertEquals("/_msearch", multiSearch.getURI());
+        assertEquals("/_msearch", multiSearch.getURI(ElasticsearchVersion.UNKNOWN));
         JSONAssert.assertEquals(expectedData, multiSearch.getData(null).toString(), false);
     }
 
diff --git a/jest-common/src/test/java/io/searchbox/core/PercolateTest.java b/jest-common/src/test/java/io/searchbox/core/PercolateTest.java
index ff005c58..416eb01c 100644
--- a/jest-common/src/test/java/io/searchbox/core/PercolateTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/PercolateTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -16,7 +17,7 @@ public class PercolateTest {
     public void percolateDocument() {
         Percolate percolate = new Percolate.Builder("twitter", "percolateQuery", "{query}").build();
         assertEquals("POST", percolate.getRestMethodName());
-        assertEquals("twitter/percolateQuery/_percolate", percolate.getURI());
+        assertEquals("twitter/percolateQuery/_percolate", percolate.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/core/PingTest.java b/jest-common/src/test/java/io/searchbox/core/PingTest.java
index cafdee5c..9630fd06 100644
--- a/jest-common/src/test/java/io/searchbox/core/PingTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/PingTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,6 +13,6 @@ public class PingTest {
 
         assertEquals("GET", ping.getRestMethodName());
         assertNull(ping.getData(null));
-        assertEquals("", ping.getURI());
+        assertEquals("", ping.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/core/SearchScrollTest.java b/jest-common/src/test/java/io/searchbox/core/SearchScrollTest.java
index 1b8c581d..5e43e1b9 100644
--- a/jest-common/src/test/java/io/searchbox/core/SearchScrollTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/SearchScrollTest.java
@@ -3,18 +3,22 @@ package io.searchbox.core;
 import com.google.common.base.Strings;
 import com.google.gson.Gson;
 import com.google.gson.JsonObject;
-import io.searchbox.action.Action;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 
 public class SearchScrollTest {
     @Test
     public void methodIsGetIfScrollIdIsShort() {
         String scrollId = Strings.padStart("scrollId", SearchScroll.MAX_SCROLL_ID_LENGTH, 'x');
-        Action searchScroll = new SearchScroll.Builder(scrollId, "1m").build();
-        String uri = searchScroll.getURI();
+        SearchScroll searchScroll = new SearchScroll.Builder(scrollId, "1m").build();
+        String uri = searchScroll.getURI(ElasticsearchVersion.UNKNOWN);
 
         assertEquals("GET", searchScroll.getRestMethodName());
         assertNull(searchScroll.getData(new Gson()));
@@ -29,8 +33,8 @@ public class SearchScrollTest {
         JsonObject expectedResults = new JsonObject();
         expectedResults.addProperty("scroll_id", scrollId);
 
-        Action searchScroll = new SearchScroll.Builder(scrollId, "1m").build();
-        String uri = searchScroll.getURI();
+        SearchScroll searchScroll = new SearchScroll.Builder(scrollId, "1m").build();
+        String uri = searchScroll.getURI(ElasticsearchVersion.UNKNOWN);
 
         assertEquals("POST", searchScroll.getRestMethodName());
         assertEquals(expectedResults.toString(), searchScroll.getData(new Gson()));
diff --git a/jest-common/src/test/java/io/searchbox/core/SearchTest.java b/jest-common/src/test/java/io/searchbox/core/SearchTest.java
index 94840687..22b869ee 100644
--- a/jest-common/src/test/java/io/searchbox/core/SearchTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/SearchTest.java
@@ -1,29 +1,28 @@
 package io.searchbox.core;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.List;
-
-import io.searchbox.action.AbstractAction;
-import io.searchbox.params.Parameters;
-import org.json.JSONException;
-import org.junit.Test;
-import org.skyscreamer.jsonassert.JSONAssert;
-
 import com.google.gson.Gson;
 import com.google.gson.JsonArray;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
-
+import io.searchbox.action.AbstractAction;
 import io.searchbox.action.Action;
+import io.searchbox.client.config.ElasticsearchVersion;
 import io.searchbox.core.search.sort.Sort;
 import io.searchbox.core.search.sort.Sort.Sorting;
+import io.searchbox.params.Parameters;
+import org.json.JSONException;
+import org.junit.Test;
+import org.skyscreamer.jsonassert.JSONAssert;
+
+import java.util.Arrays;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 /**
  * @author Dogukan Sonmez
@@ -38,67 +37,67 @@ public class SearchTest {
 
     @Test
     public void getURIWithoutIndexAndType() {
-        Action search = new Search.Builder("").build();
-        assertEquals("_all/_search", search.getURI());
+        Search search = new Search.Builder("").build();
+        assertEquals("_all/_search", search.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyOneIndex() {
-        Action search = new Search.Builder("").addIndex("twitter").build();
-        assertEquals("twitter/_search", search.getURI());
+        Search search = new Search.Builder("").addIndex("twitter").build();
+        assertEquals("twitter/_search", search.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOneIndexAndOneType() {
-        Action search = new Search.Builder("").addIndex("twitter").addType("tweet").build();
-        assertEquals("twitter/tweet/_search", search.getURI());
+        Search search = new Search.Builder("").addIndex("twitter").addType("tweet").build();
+        assertEquals("twitter/tweet/_search", search.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyOneType() {
-        Action search = new Search.Builder("").addType("tweet").build();
-        assertEquals("_all/tweet/_search", search.getURI());
+        Search search = new Search.Builder("").addType("tweet").build();
+        assertEquals("_all/tweet/_search", search.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyMultipleIndex() {
-        Action search = new Search.Builder("").addIndex("twitter").addIndex("searchbox").build();
-        assertEquals("twitter%2Csearchbox/_search", search.getURI());
+        Search search = new Search.Builder("").addIndex("twitter").addIndex("searchbox").build();
+        assertEquals("twitter%2Csearchbox/_search", search.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyMultipleType() {
-        Action search = new Search.Builder("").addType("tweet").addType("jest").build();
-        assertEquals("_all/tweet%2Cjest/_search", search.getURI());
+        Search search = new Search.Builder("").addType("tweet").addType("jest").build();
+        assertEquals("_all/tweet%2Cjest/_search", search.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithMultipleIndexAndTypes() {
-        Action search = new Search.Builder("")
+        Search search = new Search.Builder("")
                 .addIndex("twitter")
                 .addIndex("searchbox")
                 .addType("tweet")
                 .addType("jest")
                 .build();
-        assertEquals("twitter%2Csearchbox/tweet%2Cjest/_search", search.getURI());
+        assertEquals("twitter%2Csearchbox/tweet%2Cjest/_search", search.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIForTemplateWithoutIndexAndType() {
-        Action search = new Search.TemplateBuilder("").build();
-        assertEquals("_all/_search/template", search.getURI());
+        Search search = new Search.TemplateBuilder("").build();
+        assertEquals("_all/_search/template", search.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIForTemplateWithIndexAndType() {
-        Action search = new Search.TemplateBuilder("").addIndex("twitter").addType("tweet").build();
-        assertEquals("twitter/tweet/_search/template", search.getURI());
+        Search search = new Search.TemplateBuilder("").addIndex("twitter").addType("tweet").build();
+        assertEquals("twitter/tweet/_search/template", search.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithVersion() {
-        Action search = new Search.VersionBuilder("").addIndex("twitter").addType("tweet").build();
-        assertTrue("Version Parameter missing", search.getURI().contains("version=true"));
+        Search search = new Search.VersionBuilder("").addIndex("twitter").addType("tweet").build();
+        assertTrue("Version Parameter missing", search.getURI(ElasticsearchVersion.UNKNOWN).contains("version=true"));
     }
 
     @Test
@@ -241,7 +240,7 @@ public class SearchTest {
                 .build();
         srch = (AbstractAction) search;
         assertTrue(srch.getParameter(Parameters.TRACK_SCORES).size() == 1);
-        assertTrue((Boolean)srch.getParameter(Parameters.TRACK_SCORES).iterator().next());
+        assertTrue((Boolean) srch.getParameter(Parameters.TRACK_SCORES).iterator().next());
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/core/SuggestTest.java b/jest-common/src/test/java/io/searchbox/core/SuggestTest.java
index 786e41ed..f2b45a90 100644
--- a/jest-common/src/test/java/io/searchbox/core/SuggestTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/SuggestTest.java
@@ -1,6 +1,7 @@
 package io.searchbox.core;
 
 import io.searchbox.action.Action;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -10,49 +11,49 @@ public class SuggestTest {
 
     @Test
     public void getURIWithoutIndexAndType() {
-        Action suggest = new Suggest.Builder("").build();
-        assertEquals("_all/_suggest", suggest.getURI());
+        Suggest suggest = new Suggest.Builder("").build();
+        assertEquals("_all/_suggest", suggest.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyOneIndex() {
-        Action suggest = new Suggest.Builder("").addIndex("twitter").build();
-        assertEquals("twitter/_suggest", suggest.getURI());
+        Suggest suggest = new Suggest.Builder("").addIndex("twitter").build();
+        assertEquals("twitter/_suggest", suggest.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOneIndexAndOneType() {
-        Action suggest = new Suggest.Builder("").addIndex("twitter").addType("tweet").build();
-        assertEquals("twitter/tweet/_suggest", suggest.getURI());
+        Suggest suggest = new Suggest.Builder("").addIndex("twitter").addType("tweet").build();
+        assertEquals("twitter/tweet/_suggest", suggest.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyOneType() {
-        Action suggest = new Suggest.Builder("").addType("tweet").build();
-        assertEquals("_all/tweet/_suggest", suggest.getURI());
+        Suggest suggest = new Suggest.Builder("").addType("tweet").build();
+        assertEquals("_all/tweet/_suggest", suggest.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyMultipleIndex() {
-        Action suggest = new Suggest.Builder("").addIndex("twitter").addIndex("suggestbox").build();
-        assertEquals("twitter%2Csuggestbox/_suggest", suggest.getURI());
+        Suggest suggest = new Suggest.Builder("").addIndex("twitter").addIndex("suggestbox").build();
+        assertEquals("twitter%2Csuggestbox/_suggest", suggest.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyMultipleType() {
-        Action suggest = new Suggest.Builder("").addType("tweet").addType("jest").build();
-        assertEquals("_all/tweet%2Cjest/_suggest", suggest.getURI());
+        Suggest suggest = new Suggest.Builder("").addType("tweet").addType("jest").build();
+        assertEquals("_all/tweet%2Cjest/_suggest", suggest.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithMultipleIndexAndTypes() {
-        Action suggest = new Suggest.Builder("")
+        Suggest suggest = new Suggest.Builder("")
             .addIndex("twitter")
             .addIndex("suggestbox")
             .addType("tweet")
             .addType("jest")
             .build();
-        assertEquals("twitter%2Csuggestbox/tweet%2Cjest/_suggest", suggest.getURI());
+        assertEquals("twitter%2Csuggestbox/tweet%2Cjest/_suggest", suggest.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/core/UpdateByQueryTest.java b/jest-common/src/test/java/io/searchbox/core/UpdateByQueryTest.java
index 37ad5eba..44f048ad 100644
--- a/jest-common/src/test/java/io/searchbox/core/UpdateByQueryTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/UpdateByQueryTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,28 +13,28 @@ public class UpdateByQueryTest {
 
     @Test
     public void getURIWithoutIndexAndType() {
-        assertEquals("_all/_update_by_query", new UpdateByQuery.Builder(null).build().getURI());
+        assertEquals("_all/_update_by_query", new UpdateByQuery.Builder(null).build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyOneIndex() {
-        assertEquals("twitter/_update_by_query", new UpdateByQuery.Builder(null).addIndex("twitter").build().getURI());
+        assertEquals("twitter/_update_by_query", new UpdateByQuery.Builder(null).addIndex("twitter").build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyMultipleType() {
-        assertEquals("_all/tweet%2Cjest/_update_by_query", new UpdateByQuery.Builder(null).addType("tweet").addType("jest").build().getURI());
+        assertEquals("_all/tweet%2Cjest/_update_by_query", new UpdateByQuery.Builder(null).addType("tweet").addType("jest").build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOneIndexAndOneType() {
-        assertEquals("twitter/tweet/_update_by_query", new UpdateByQuery.Builder(null).addIndex("twitter").addType("tweet").build().getURI());
+        assertEquals("twitter/tweet/_update_by_query", new UpdateByQuery.Builder(null).addIndex("twitter").addType("tweet").build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void getURIWithOnlyMultipleIndex() {
         assertEquals("twitter%2Csearchbox/_update_by_query",
-                new UpdateByQuery.Builder(null).addIndex("twitter").addIndex("searchbox").build().getURI());
+                new UpdateByQuery.Builder(null).addIndex("twitter").addIndex("searchbox").build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -43,8 +44,7 @@ public class UpdateByQueryTest {
                 .addIndex("searchbox")
                 .addType("tweet")
                 .addType("jest")
-                .build()
-                .getURI());
+                .build().getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/core/UpdateTest.java b/jest-common/src/test/java/io/searchbox/core/UpdateTest.java
index 9baa2579..05247c03 100644
--- a/jest-common/src/test/java/io/searchbox/core/UpdateTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/UpdateTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -14,7 +15,7 @@ public class UpdateTest {
     public void updateDocumentWithoutDoc(){
         Update update = new Update.Builder(new Object()).index("twitter").type("tweet").id("1").build();
         assertEquals("POST", update.getRestMethodName());
-        assertEquals("twitter/tweet/1/_update", update.getURI());
+        assertEquals("twitter/tweet/1/_update", update.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/core/ValidateTest.java b/jest-common/src/test/java/io/searchbox/core/ValidateTest.java
index b5f1c985..6d9849a4 100644
--- a/jest-common/src/test/java/io/searchbox/core/ValidateTest.java
+++ b/jest-common/src/test/java/io/searchbox/core/ValidateTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.core;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -18,7 +19,7 @@ public class ValidateTest {
 
         assertEquals("POST", validate.getRestMethodName());
         assertEquals("{query:query}", validate.getData(null));
-        assertEquals("/_validate/query", validate.getURI());
+        assertEquals("/_validate/query", validate.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -27,7 +28,7 @@ public class ValidateTest {
 
         assertEquals("POST", validate.getRestMethodName());
         assertEquals("{query:query}", validate.getData(null));
-        assertEquals("twitter/_validate/query", validate.getURI());
+        assertEquals("twitter/_validate/query", validate.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -36,7 +37,7 @@ public class ValidateTest {
 
         assertEquals("POST", validate.getRestMethodName());
         assertEquals("{query:query}", validate.getData(null));
-        assertEquals("twitter/tweet/_validate/query", validate.getURI());
+        assertEquals("twitter/tweet/_validate/query", validate.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/AnalyzeTest.java b/jest-common/src/test/java/io/searchbox/indices/AnalyzeTest.java
index 8f2ef407..e62db488 100644
--- a/jest-common/src/test/java/io/searchbox/indices/AnalyzeTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/AnalyzeTest.java
@@ -2,6 +2,7 @@ package io.searchbox.indices;
 
 import com.google.common.collect.ImmutableList;
 import com.google.gson.Gson;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -17,7 +18,7 @@ public class AnalyzeTest {
         Analyze analyze = new Analyze.Builder()
                 .analyzer("standard")
                 .build();
-        assertEquals("/_analyze?analyzer=standard", analyze.getURI());
+        assertEquals("/_analyze?analyzer=standard", analyze.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -26,7 +27,7 @@ public class AnalyzeTest {
                 .tokenizer("keyword")
                 .filter("lowercase")
                 .build();
-        assertEquals("/_analyze?tokenizer=keyword&filter=lowercase", analyze.getURI());
+        assertEquals("/_analyze?tokenizer=keyword&filter=lowercase", analyze.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -34,7 +35,7 @@ public class AnalyzeTest {
         Analyze analyze = new Analyze.Builder()
                 .index("test")
                 .build();
-        assertEquals("test/_analyze", analyze.getURI());
+        assertEquals("test/_analyze", analyze.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -43,7 +44,7 @@ public class AnalyzeTest {
                 .index("test")
                 .analyzer("whitespace")
                 .build();
-        assertEquals("test/_analyze?analyzer=whitespace", analyze.getURI());
+        assertEquals("test/_analyze?analyzer=whitespace", analyze.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -52,7 +53,7 @@ public class AnalyzeTest {
                 .index("test")
                 .field("obj1.field1")
                 .build();
-        assertEquals("test/_analyze?field=obj1.field1", analyze.getURI());
+        assertEquals("test/_analyze?field=obj1.field1", analyze.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/ClearCacheTest.java b/jest-common/src/test/java/io/searchbox/indices/ClearCacheTest.java
index 8488380d..277ac5a6 100644
--- a/jest-common/src/test/java/io/searchbox/indices/ClearCacheTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/ClearCacheTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -13,19 +14,19 @@ public class ClearCacheTest {
     @Test
     public void testBasicUrlGeneration() {
         ClearCache clearCache = new ClearCache.Builder().build();
-        assertEquals("_all/_cache/clear", clearCache.getURI());
+        assertEquals("_all/_cache/clear", clearCache.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testBasicUrlGenerationWithParameters() {
         ClearCache clearCache = new ClearCache.Builder().bloom(true).fieldData(false).build();
-        assertEquals("_all/_cache/clear?bloom=true&field_data=false", clearCache.getURI());
+        assertEquals("_all/_cache/clear?bloom=true&field_data=false", clearCache.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testMultiIndexUrlGenerationWithParameters() {
         ClearCache clearCache = new ClearCache.Builder().addIndex("tom").addIndex("jerry").bloom(true).build();
-        assertEquals("tom%2Cjerry/_cache/clear?bloom=true", clearCache.getURI());
+        assertEquals("tom%2Cjerry/_cache/clear?bloom=true", clearCache.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/CloseIndexTest.java b/jest-common/src/test/java/io/searchbox/indices/CloseIndexTest.java
index 58681c11..d75b6c3d 100644
--- a/jest-common/src/test/java/io/searchbox/indices/CloseIndexTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/CloseIndexTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -15,7 +16,7 @@ public class CloseIndexTest {
         CloseIndex closeIndex = new CloseIndex.Builder("twitter").build();
 
         assertEquals("POST", closeIndex.getRestMethodName());
-        assertEquals("twitter/_close", closeIndex.getURI());
+        assertEquals("twitter/_close", closeIndex.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/CreateIndexTest.java b/jest-common/src/test/java/io/searchbox/indices/CreateIndexTest.java
index 05ec90ac..6401161b 100644
--- a/jest-common/src/test/java/io/searchbox/indices/CreateIndexTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/CreateIndexTest.java
@@ -1,6 +1,7 @@
 package io.searchbox.indices;
 
 import com.google.gson.Gson;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.elasticsearch.common.settings.Settings;
 import org.junit.Test;
 
@@ -16,7 +17,7 @@ public class CreateIndexTest {
     public void createIndexWithoutSettings() {
         CreateIndex createIndex = new CreateIndex.Builder("tweet").build();
 
-        assertEquals("tweet", createIndex.getURI());
+        assertEquals("tweet", createIndex.getURI(ElasticsearchVersion.UNKNOWN));
         assertEquals("PUT", createIndex.getRestMethodName());
         String settings = new Gson().toJson(createIndex.getData(new Gson()));
         assertEquals("\"{}\"", settings);
diff --git a/jest-common/src/test/java/io/searchbox/indices/DeleteIndexTest.java b/jest-common/src/test/java/io/searchbox/indices/DeleteIndexTest.java
index c84e2174..ce121097 100644
--- a/jest-common/src/test/java/io/searchbox/indices/DeleteIndexTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/DeleteIndexTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -15,7 +16,7 @@ public class DeleteIndexTest {
         DeleteIndex delete = new DeleteIndex.Builder("twitter").build();
 
         assertEquals("DELETE", delete.getRestMethodName());
-        assertEquals("twitter", delete.getURI());
+        assertEquals("twitter", delete.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -23,7 +24,7 @@ public class DeleteIndexTest {
         DeleteIndex delete = new DeleteIndex.Builder("twitter").type("tweet").build();
 
         assertEquals("DELETE", delete.getRestMethodName());
-        assertEquals("twitter/tweet", delete.getURI());
+        assertEquals("twitter/tweet", delete.getURI(ElasticsearchVersion.UNKNOWN));
 
     }
 
diff --git a/jest-common/src/test/java/io/searchbox/indices/FlushTest.java b/jest-common/src/test/java/io/searchbox/indices/FlushTest.java
index c19f8d7c..ec767325 100644
--- a/jest-common/src/test/java/io/searchbox/indices/FlushTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/FlushTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class FlushTest {
         Flush flush = new Flush.Builder().addIndex("twitter").addIndex("myspace").build();
 
         assertEquals("POST", flush.getRestMethodName());
-        assertEquals("twitter%2Cmyspace/_flush", flush.getURI());
+        assertEquals("twitter%2Cmyspace/_flush", flush.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -20,7 +21,7 @@ public class FlushTest {
         Flush flush = new Flush.Builder().addIndex("twitter").force().build();
 
         assertEquals("POST", flush.getRestMethodName());
-        assertEquals("twitter/_flush?force=true", flush.getURI());
+        assertEquals("twitter/_flush?force=true", flush.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -28,7 +29,7 @@ public class FlushTest {
         Flush flush = new Flush.Builder().addIndex("twitter").waitIfOngoing().build();
 
         assertEquals("POST", flush.getRestMethodName());
-        assertEquals("twitter/_flush?wait_if_ongoing=true", flush.getURI());
+        assertEquals("twitter/_flush?wait_if_ongoing=true", flush.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/ForceMergeTest.java b/jest-common/src/test/java/io/searchbox/indices/ForceMergeTest.java
index 0ffa182f..aefdfb84 100644
--- a/jest-common/src/test/java/io/searchbox/indices/ForceMergeTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/ForceMergeTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class ForceMergeTest {
     	ForceMerge forceMerge = new ForceMerge.Builder().addIndex("twitter").build();
 
         assertEquals("POST", forceMerge.getRestMethodName());
-        assertEquals("twitter/_forcemerge", forceMerge.getURI());
+        assertEquals("twitter/_forcemerge", forceMerge.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/IndicesExistsTest.java b/jest-common/src/test/java/io/searchbox/indices/IndicesExistsTest.java
index 0fc35505..4b19cdf1 100644
--- a/jest-common/src/test/java/io/searchbox/indices/IndicesExistsTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/IndicesExistsTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -14,7 +15,7 @@ public class IndicesExistsTest {
     public void testBasicUriGeneration() {
         IndicesExists indicesExists = new IndicesExists.Builder("twitter").build();
         assertEquals("HEAD", indicesExists.getRestMethodName());
-        assertEquals("twitter", indicesExists.getURI());
+        assertEquals("twitter", indicesExists.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/OpenIndexTest.java b/jest-common/src/test/java/io/searchbox/indices/OpenIndexTest.java
index d70e120b..88804984 100644
--- a/jest-common/src/test/java/io/searchbox/indices/OpenIndexTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/OpenIndexTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class OpenIndexTest {
         OpenIndex openIndex = new OpenIndex.Builder("twitter").build();
 
         assertEquals("POST", openIndex.getRestMethodName());
-        assertEquals("twitter/_open", openIndex.getURI());
+        assertEquals("twitter/_open", openIndex.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/OptimizeTest.java b/jest-common/src/test/java/io/searchbox/indices/OptimizeTest.java
index 9ae76d53..79df58e5 100644
--- a/jest-common/src/test/java/io/searchbox/indices/OptimizeTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/OptimizeTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class OptimizeTest {
         Optimize optimize = new Optimize.Builder().addIndex("twitter").build();
 
         assertEquals("POST", optimize.getRestMethodName());
-        assertEquals("twitter/_optimize", optimize.getURI());
+        assertEquals("twitter/_optimize", optimize.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/RefreshTest.java b/jest-common/src/test/java/io/searchbox/indices/RefreshTest.java
index 098740c5..bfab01d9 100644
--- a/jest-common/src/test/java/io/searchbox/indices/RefreshTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/RefreshTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class RefreshTest {
         Refresh refresh = new Refresh.Builder().addIndex("twitter").addIndex("myspace").build();
 
         assertEquals("POST", refresh.getRestMethodName());
-        assertEquals("twitter%2Cmyspace/_refresh", refresh.getURI());
+        assertEquals("twitter%2Cmyspace/_refresh", refresh.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/RolloverTest.java b/jest-common/src/test/java/io/searchbox/indices/RolloverTest.java
index c1f4be73..5068814c 100644
--- a/jest-common/src/test/java/io/searchbox/indices/RolloverTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/RolloverTest.java
@@ -1,6 +1,7 @@
 package io.searchbox.indices;
 
 import com.google.gson.Gson;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.elasticsearch.common.collect.MapBuilder;
 import org.junit.Test;
 
@@ -24,7 +25,7 @@ public class RolloverTest {
     public void testBasicUriGeneration() {
         Rollover rollover = new Rollover.Builder("twitter").conditions(rolloverConditions).build();
         assertEquals("POST", rollover.getRestMethodName());
-        assertEquals("twitter/_rollover", rollover.getURI());
+        assertEquals("twitter/_rollover", rollover.getURI(ElasticsearchVersion.UNKNOWN));
         assertEquals("{\"conditions\":{\"max_age\":\"1d\",\"max_docs\":\"10000\"}}", rollover.getData(new Gson()));
     }
 
@@ -32,7 +33,7 @@ public class RolloverTest {
     public void testBasicUriWithSettingsGeneration() {
         Rollover rollover = new Rollover.Builder("twitter").conditions(rolloverConditions).settings(rolloverSettings).build();
         assertEquals("POST", rollover.getRestMethodName());
-        assertEquals("twitter/_rollover", rollover.getURI());
+        assertEquals("twitter/_rollover", rollover.getURI(ElasticsearchVersion.UNKNOWN));
         assertEquals("{\"settings\":{\"index.number_of_shards\":\"2\"},\"conditions\":{\"max_age\":\"1d\",\"max_docs\":\"10000\"}}", rollover.getData(new Gson()));
     }
 
@@ -40,7 +41,7 @@ public class RolloverTest {
     public void testDryRunUriGeneration() {
         Rollover rollover = new Rollover.Builder("twitter").conditions(rolloverConditions).setDryRun(true).build();
         assertEquals("POST", rollover.getRestMethodName());
-        assertEquals("twitter/_rollover?dry_run", rollover.getURI());
+        assertEquals("twitter/_rollover?dry_run", rollover.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/StatsTest.java b/jest-common/src/test/java/io/searchbox/indices/StatsTest.java
index 27744449..46d70f8d 100644
--- a/jest-common/src/test/java/io/searchbox/indices/StatsTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/StatsTest.java
@@ -1,6 +1,7 @@
 package io.searchbox.indices;
 
-import io.searchbox.action.Action;
+import io.searchbox.action.AbstractAction;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import java.net.URLDecoder;
@@ -15,7 +16,7 @@ public class StatsTest {
         Stats stats = new Stats.Builder().addIndex("twitter").build();
 
         assertEquals("GET", stats.getRestMethodName());
-        assertEquals("twitter/_stats", stats.getURI());
+        assertEquals("twitter/_stats", stats.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -36,22 +37,21 @@ public class StatsTest {
 
     @Test
     public void testUriGenerationWithStatsFields() throws Exception {
-        Action action = new Stats.Builder()
+        Stats action = new Stats.Builder()
                 .flush(true)
                 .indexing(true)
                 .search(true, "group1", "group2")
                 .build();
-        assertEquals("_all/_stats/flush,indexing,search?groups=group1,group2", URLDecoder.decode(action.getURI()));
+        assertEquals("_all/_stats/flush,indexing,search?groups=group1,group2", URLDecoder.decode(action.getURI(ElasticsearchVersion.UNKNOWN), AbstractAction.CHARSET));
     }
 
     @Test
     public void testUriGenerationWhenRemovingStatsFields() throws Exception {
-        Action action = new Stats.Builder()
+        Stats action = new Stats.Builder()
                 .flush(true)
                 .indexing(true)
                 .indexing(false)
                 .build();
-        assertEquals("_all/_stats/flush", URLDecoder.decode(action.getURI()));
+        assertEquals("_all/_stats/flush", URLDecoder.decode(action.getURI(ElasticsearchVersion.UNKNOWN), AbstractAction.CHARSET));
     }
-
 }
\ No newline at end of file
diff --git a/jest-common/src/test/java/io/searchbox/indices/aliases/AliasExistsTest.java b/jest-common/src/test/java/io/searchbox/indices/aliases/AliasExistsTest.java
index 4ac76aa5..aa75ae22 100644
--- a/jest-common/src/test/java/io/searchbox/indices/aliases/AliasExistsTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/aliases/AliasExistsTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.aliases;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -10,7 +11,7 @@ public class AliasExistsTest {
         AliasExists aliasExists = new AliasExists.Builder().build();
 
         assertEquals("HEAD", aliasExists.getRestMethodName());
-        assertEquals("_all/_alias/*", aliasExists.getURI());
+        assertEquals("_all/_alias/*", aliasExists.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -18,7 +19,7 @@ public class AliasExistsTest {
         AliasExists aliasExists = new AliasExists.Builder().addIndex("indexName").build();
 
         assertEquals("HEAD", aliasExists.getRestMethodName());
-        assertEquals("indexName/_alias/*", aliasExists.getURI());
+        assertEquals("indexName/_alias/*", aliasExists.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -26,7 +27,7 @@ public class AliasExistsTest {
         AliasExists aliasExists = new AliasExists.Builder().alias("aliasName").build();
 
         assertEquals("HEAD", aliasExists.getRestMethodName());
-        assertEquals("_all/_alias/aliasName", aliasExists.getURI());
+        assertEquals("_all/_alias/aliasName", aliasExists.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -34,6 +35,6 @@ public class AliasExistsTest {
         AliasExists aliasExists = new AliasExists.Builder().addIndex("indexName").alias("aliasName").build();
 
         assertEquals("HEAD", aliasExists.getRestMethodName());
-        assertEquals("indexName/_alias/aliasName", aliasExists.getURI());
+        assertEquals("indexName/_alias/aliasName", aliasExists.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
\ No newline at end of file
diff --git a/jest-common/src/test/java/io/searchbox/indices/aliases/GetAliasesTest.java b/jest-common/src/test/java/io/searchbox/indices/aliases/GetAliasesTest.java
index 39fece2a..fd3de0ce 100644
--- a/jest-common/src/test/java/io/searchbox/indices/aliases/GetAliasesTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/aliases/GetAliasesTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.aliases;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import java.util.Arrays;
 import org.junit.Test;
 
@@ -13,7 +14,7 @@ public class GetAliasesTest {
         GetAliases getAliases = new GetAliases.Builder().addIndex("twitter").build();
 
         assertEquals("GET", getAliases.getRestMethodName());
-        assertEquals("twitter/_alias", getAliases.getURI());
+        assertEquals("twitter/_alias", getAliases.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -21,7 +22,7 @@ public class GetAliasesTest {
         GetAliases getAliases = new GetAliases.Builder().addIndex("twitter").addAlias("alias").build();
 
         assertEquals("GET", getAliases.getRestMethodName());
-        assertEquals("twitter/_alias/alias", getAliases.getURI());
+        assertEquals("twitter/_alias/alias", getAliases.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -29,7 +30,7 @@ public class GetAliasesTest {
         GetAliases getAliases = new GetAliases.Builder().addIndex("twitter").addAliases(Arrays.asList(new String[]{"alias1", "alias2"})).build();
 
         assertEquals("GET", getAliases.getRestMethodName());
-        assertEquals("twitter/_alias/alias1,alias2", getAliases.getURI());
+        assertEquals("twitter/_alias/alias1,alias2", getAliases.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/aliases/ModifyAliasesTest.java b/jest-common/src/test/java/io/searchbox/indices/aliases/ModifyAliasesTest.java
index 37b98c21..1880502e 100644
--- a/jest-common/src/test/java/io/searchbox/indices/aliases/ModifyAliasesTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/aliases/ModifyAliasesTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.aliases;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.elasticsearch.common.collect.MapBuilder;
 import org.junit.Test;
 
@@ -26,7 +27,7 @@ public class ModifyAliasesTest {
         ModifyAliases modifyAliases = new ModifyAliases.Builder(addMapping).build();
 
         assertEquals("POST", modifyAliases.getRestMethodName());
-        assertEquals("/_aliases", modifyAliases.getURI());
+        assertEquals("/_aliases", modifyAliases.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/mapping/DeleteMappingTest.java b/jest-common/src/test/java/io/searchbox/indices/mapping/DeleteMappingTest.java
index a82b458c..1c0f15c3 100644
--- a/jest-common/src/test/java/io/searchbox/indices/mapping/DeleteMappingTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/mapping/DeleteMappingTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.mapping;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class DeleteMappingTest {
         DeleteMapping deleteMapping = new DeleteMapping.Builder("twitter","tweet").build();
 
         assertEquals("DELETE", deleteMapping.getRestMethodName());
-        assertEquals("twitter/tweet/_mapping", deleteMapping.getURI());
+        assertEquals("twitter/tweet/_mapping", deleteMapping.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/mapping/GetMappingTest.java b/jest-common/src/test/java/io/searchbox/indices/mapping/GetMappingTest.java
index 369e61cd..d004508e 100644
--- a/jest-common/src/test/java/io/searchbox/indices/mapping/GetMappingTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/mapping/GetMappingTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.mapping;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class GetMappingTest {
         GetMapping getMapping = new GetMapping.Builder().addIndex("twitter").build();
 
         assertEquals("GET", getMapping.getRestMethodName());
-        assertEquals("twitter/_mapping", getMapping.getURI());
+        assertEquals("twitter/_mapping", getMapping.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/mapping/PutMappingTest.java b/jest-common/src/test/java/io/searchbox/indices/mapping/PutMappingTest.java
index 2edb3fce..ac2a9406 100644
--- a/jest-common/src/test/java/io/searchbox/indices/mapping/PutMappingTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/mapping/PutMappingTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.mapping;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class PutMappingTest {
         PutMapping putMapping = new PutMapping.Builder("twitter", "tweet", "source").build();
 
         assertEquals("PUT", putMapping.getRestMethodName());
-        assertEquals("twitter/tweet/_mapping", putMapping.getURI());
+        assertEquals("twitter/tweet/_mapping", putMapping.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/reindex/ReindexTest.java b/jest-common/src/test/java/io/searchbox/indices/reindex/ReindexTest.java
index d9665d6f..a44b6df0 100644
--- a/jest-common/src/test/java/io/searchbox/indices/reindex/ReindexTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/reindex/ReindexTest.java
@@ -2,6 +2,7 @@ package io.searchbox.indices.reindex;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.gson.GsonBuilder;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 import org.skyscreamer.jsonassert.JSONAssert;
 
@@ -18,7 +19,7 @@ public class ReindexTest {
     	Reindex reindex = new Reindex.Builder(source,dest).build();
 
         assertEquals("POST", reindex.getRestMethodName());
-        assertEquals("/_reindex", reindex.getURI());
+        assertEquals("/_reindex", reindex.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
 	@Test
@@ -31,7 +32,7 @@ public class ReindexTest {
 		                             .requestsPerSecond(5d)
 		                             .build();
 
-		String generatedURI = reindex.getURI();
+        String generatedURI = reindex.getURI(ElasticsearchVersion.UNKNOWN);
 		
 		String expectedURI = "/_reindex?wait_for_completion=true&wait_for_active_shards=1&timeout=5000&requests_per_second=5.0";
 		assertEquals(expectedURI, generatedURI);
diff --git a/jest-common/src/test/java/io/searchbox/indices/script/CreateIndexedScriptTest.java b/jest-common/src/test/java/io/searchbox/indices/script/CreateIndexedScriptTest.java
index 75bba13a..8f2db33a 100644
--- a/jest-common/src/test/java/io/searchbox/indices/script/CreateIndexedScriptTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/script/CreateIndexedScriptTest.java
@@ -3,6 +3,7 @@ package io.searchbox.indices.script;
 import com.google.gson.Gson;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -23,7 +24,7 @@ public class CreateIndexedScriptTest {
     private String groovysnippet;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         builder = new CreateStoredScript.Builder(A_NAME).setLanguage(JAVASCRIPT);
         script = builder.build();
         groovysnippet = "def test_a=123\n" +
@@ -31,11 +32,11 @@ public class CreateIndexedScriptTest {
     }
 
     @Test
-    public void defaultScriptingLanguageIsGroovy() throws Exception {
+    public void defaultScriptingLanguageIsGroovy() {
         CreateStoredScript script = new CreateStoredScript.Builder(A_NAME).build();
 
         assertEquals(GROOVY, script.getScriptLanguage());
-        assertThat(script.buildURI(), containsString(GROOVY.pathParameterName));
+        assertThat(script.buildURI(ElasticsearchVersion.UNKNOWN), containsString(GROOVY.pathParameterName));
     }
 
     @Test
@@ -44,17 +45,17 @@ public class CreateIndexedScriptTest {
     }
 
     @Test
-    public void scriptingLanguageIsSetIntoPath() throws Exception {
-        assertThat(script.buildURI(), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/"));
+    public void scriptingLanguageIsSetIntoPath() {
+        assertThat(script.buildURI(ElasticsearchVersion.UNKNOWN), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/"));
     }
 
     @Test
-    public void nameOfTheScriptIsSetIntoPath() throws Exception {
-        assertThat(script.buildURI(), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/" + A_NAME));
+    public void nameOfTheScriptIsSetIntoPath() {
+        assertThat(script.buildURI(ElasticsearchVersion.UNKNOWN), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/" + A_NAME));
     }
 
     @Test
-    public void scriptSourceIsValidJsonString() throws Exception {
+    public void scriptSourceIsValidJsonString() {
         builder.setSource(groovysnippet);
 
         script = builder.build();
diff --git a/jest-common/src/test/java/io/searchbox/indices/script/DeleteIndexedScriptTest.java b/jest-common/src/test/java/io/searchbox/indices/script/DeleteIndexedScriptTest.java
index 071d329e..8ca2cd16 100644
--- a/jest-common/src/test/java/io/searchbox/indices/script/DeleteIndexedScriptTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/script/DeleteIndexedScriptTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.script;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -15,17 +16,17 @@ public class DeleteIndexedScriptTest {
     private DeleteStoredScript script;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         DeleteStoredScript.Builder builder = new DeleteStoredScript.Builder(A_NAME).setLanguage(JAVASCRIPT);
         script = builder.build();
     }
 
     @Test
-    public void defaultScriptingLanguageIsGroovy() throws Exception {
+    public void defaultScriptingLanguageIsGroovy() {
         DeleteStoredScript script = new DeleteStoredScript.Builder(A_NAME).build();
 
         assertEquals(GROOVY, script.getScriptLanguage());
-        assertThat(script.buildURI(), containsString(GROOVY.pathParameterName));
+        assertThat(script.buildURI(ElasticsearchVersion.UNKNOWN), containsString(GROOVY.pathParameterName));
     }
 
     @Test
@@ -34,13 +35,13 @@ public class DeleteIndexedScriptTest {
     }
 
     @Test
-    public void scriptingLanguageIsSetIntoPath() throws Exception {
-        assertThat(script.buildURI(), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/"));
+    public void scriptingLanguageIsSetIntoPath() {
+        assertThat(script.buildURI(ElasticsearchVersion.UNKNOWN), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/"));
     }
 
     @Test
-    public void nameOfTheScriptIsSetIntoPath() throws Exception {
-        assertThat(script.buildURI(), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/" + A_NAME));
+    public void nameOfTheScriptIsSetIntoPath() {
+        assertThat(script.buildURI(ElasticsearchVersion.UNKNOWN), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/" + A_NAME));
     }
 
 }
\ No newline at end of file
diff --git a/jest-common/src/test/java/io/searchbox/indices/script/GetIndexedScriptTest.java b/jest-common/src/test/java/io/searchbox/indices/script/GetIndexedScriptTest.java
index bd0795ff..7252f7e1 100644
--- a/jest-common/src/test/java/io/searchbox/indices/script/GetIndexedScriptTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/script/GetIndexedScriptTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.script;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -18,17 +19,17 @@ public class GetIndexedScriptTest {
     private GetStoredScript script;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         GetStoredScript.Builder builder = new GetStoredScript.Builder(A_NAME).setLanguage(JAVASCRIPT);
         script = builder.build();
     }
 
     @Test
-    public void defaultScriptingLanguageIsGroovy() throws Exception {
+    public void defaultScriptingLanguageIsGroovy() {
         GetStoredScript script = new GetStoredScript.Builder(A_NAME).build();
 
         assertEquals(GROOVY, script.getScriptLanguage());
-        assertThat(script.buildURI(), containsString(GROOVY.pathParameterName));
+        assertThat(script.buildURI(ElasticsearchVersion.UNKNOWN), containsString(GROOVY.pathParameterName));
     }
 
     @Test
@@ -37,13 +38,13 @@ public class GetIndexedScriptTest {
     }
 
     @Test
-    public void scriptingLanguageIsSetIntoPath() throws Exception {
-        assertThat(script.buildURI(), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/"));
+    public void scriptingLanguageIsSetIntoPath() {
+        assertThat(script.buildURI(ElasticsearchVersion.UNKNOWN), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/"));
     }
 
     @Test
-    public void nameOfTheScriptIsSetIntoPath() throws Exception {
-        assertThat(script.buildURI(), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/" + A_NAME));
+    public void nameOfTheScriptIsSetIntoPath() {
+        assertThat(script.buildURI(ElasticsearchVersion.UNKNOWN), containsString("/_scripts/" + JAVASCRIPT.pathParameterName + "/" + A_NAME));
     }
 
 }
\ No newline at end of file
diff --git a/jest-common/src/test/java/io/searchbox/indices/settings/GetSettingsTest.java b/jest-common/src/test/java/io/searchbox/indices/settings/GetSettingsTest.java
index 1f17733c..b0151615 100644
--- a/jest-common/src/test/java/io/searchbox/indices/settings/GetSettingsTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/settings/GetSettingsTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.settings;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class GetSettingsTest {
         String expectedUri = "_all/_settings";
 
         GetSettings getSettings = new GetSettings.Builder().build();
-        assertEquals(expectedUri, getSettings.getURI());
+        assertEquals(expectedUri, getSettings.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -20,7 +21,7 @@ public class GetSettingsTest {
         String expectedUri = "_all/_settings?prefix=index.routing.allocation.";
 
         GetSettings getSettings = new GetSettings.Builder().prefixQuery("index.routing.allocation.").build();
-        assertEquals(expectedUri, getSettings.getURI());
+        assertEquals(expectedUri, getSettings.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -28,7 +29,7 @@ public class GetSettingsTest {
         String expectedUri = "_all/_settings?prefix=";
 
         GetSettings getSettings = new GetSettings.Builder().prefixQuery("").build();
-        assertEquals(expectedUri, getSettings.getURI());
+        assertEquals(expectedUri, getSettings.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -36,7 +37,7 @@ public class GetSettingsTest {
         String expectedUri = "books/_settings";
 
         GetSettings getSettings = new GetSettings.Builder().addIndex("books").build();
-        assertEquals(expectedUri, getSettings.getURI());
+        assertEquals(expectedUri, getSettings.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -44,7 +45,7 @@ public class GetSettingsTest {
         String expectedUri = "books/_settings?prefix=index.routing.allocation.";
 
         GetSettings getSettings = new GetSettings.Builder().addIndex("books").prefixQuery("index.routing.allocation.").build();
-        assertEquals(expectedUri, getSettings.getURI());
+        assertEquals(expectedUri, getSettings.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -52,7 +53,7 @@ public class GetSettingsTest {
         String expectedUri = "books%2Carticles/_settings";
 
         GetSettings getSettings = new GetSettings.Builder().addIndex("books").addIndex("articles").build();
-        assertEquals(expectedUri, getSettings.getURI());
+        assertEquals(expectedUri, getSettings.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -61,7 +62,7 @@ public class GetSettingsTest {
 
         GetSettings getSettings = new GetSettings.Builder()
                 .addIndex("books").addIndex("articles").prefixQuery("index.routing.allocation.").build();
-        assertEquals(expectedUri, getSettings.getURI());
+        assertEquals(expectedUri, getSettings.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -69,7 +70,7 @@ public class GetSettingsTest {
         String expectedUri = "2013-*/_settings";
 
         GetSettings getSettings = new GetSettings.Builder().addIndex("2013-*").build();
-        assertEquals(expectedUri, getSettings.getURI());
+        assertEquals(expectedUri, getSettings.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -77,7 +78,7 @@ public class GetSettingsTest {
         String expectedUri = "2013-*/_settings?prefix=index.routing.allocation.";
 
         GetSettings getSettings = new GetSettings.Builder().addIndex("2013-*").prefixQuery("index.routing.allocation.").build();
-        assertEquals(expectedUri, getSettings.getURI());
+        assertEquals(expectedUri, getSettings.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/settings/UpdateSettingsTest.java b/jest-common/src/test/java/io/searchbox/indices/settings/UpdateSettingsTest.java
index 1e0ea662..433d41fe 100644
--- a/jest-common/src/test/java/io/searchbox/indices/settings/UpdateSettingsTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/settings/UpdateSettingsTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.settings;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class UpdateSettingsTest {
         String expectedUri = "_all/_settings";
 
         UpdateSettings updateSettings = new UpdateSettings.Builder("").build();
-        assertEquals(expectedUri, updateSettings.getURI());
+        assertEquals(expectedUri, updateSettings.getURI(ElasticsearchVersion.UNKNOWN));
         assertEquals("", updateSettings.getData(null));
         assertEquals("PUT", updateSettings.getRestMethodName());
     }
diff --git a/jest-common/src/test/java/io/searchbox/indices/template/DeleteTemplateTest.java b/jest-common/src/test/java/io/searchbox/indices/template/DeleteTemplateTest.java
index c72e5639..c47228bd 100644
--- a/jest-common/src/test/java/io/searchbox/indices/template/DeleteTemplateTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/template/DeleteTemplateTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.template;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class DeleteTemplateTest {
         DeleteTemplate deleteTemplate = new DeleteTemplate.Builder("personal_tweet").build();
 
         assertEquals("DELETE", deleteTemplate.getRestMethodName());
-        assertEquals("_template/personal_tweet", deleteTemplate.getURI());
+        assertEquals("_template/personal_tweet", deleteTemplate.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/template/GetTemplateTest.java b/jest-common/src/test/java/io/searchbox/indices/template/GetTemplateTest.java
index 9c75f40c..4acf8be1 100644
--- a/jest-common/src/test/java/io/searchbox/indices/template/GetTemplateTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/template/GetTemplateTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.template;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class GetTemplateTest {
         GetTemplate getTemplate = new GetTemplate.Builder("personal_tweet").build();
 
         assertEquals("GET", getTemplate.getRestMethodName());
-        assertEquals("_template/personal_tweet", getTemplate.getURI());
+        assertEquals("_template/personal_tweet", getTemplate.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/template/PutTemplateTest.java b/jest-common/src/test/java/io/searchbox/indices/template/PutTemplateTest.java
index f69fde70..557e662a 100644
--- a/jest-common/src/test/java/io/searchbox/indices/template/PutTemplateTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/template/PutTemplateTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.template;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -12,7 +13,7 @@ public class PutTemplateTest {
         PutTemplate putTemplate = new PutTemplate.Builder("sponsored_tweet", new Object()).build();
 
         assertEquals("PUT", putTemplate.getRestMethodName());
-        assertEquals("_template/sponsored_tweet", putTemplate.getURI());
+        assertEquals("_template/sponsored_tweet", putTemplate.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/indices/type/TypeExistTest.java b/jest-common/src/test/java/io/searchbox/indices/type/TypeExistTest.java
index 1a1b8eac..8e8bb707 100644
--- a/jest-common/src/test/java/io/searchbox/indices/type/TypeExistTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/type/TypeExistTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.indices.type;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -15,7 +16,15 @@ public class TypeExistTest {
 		TypeExist typeExist = new TypeExist.Builder("happyprg").addType("seohoo").build();
 
 		assertEquals("HEAD", typeExist.getRestMethodName());
-		assertEquals("happyprg/seohoo", typeExist.getURI());
+        assertEquals("happyprg/seohoo", typeExist.getURI(ElasticsearchVersion.UNKNOWN));
+	}
+
+	@Test
+	public void testBasicUriGeneration_compatibleForES55() {
+		TypeExist typeExist = new TypeExist.Builder("happyprg").addType("seohoo").build();
+
+		assertEquals("HEAD", typeExist.getRestMethodName());
+		assertEquals("happyprg/_mapping/seohoo", typeExist.getURI(ElasticsearchVersion.V55));
 	}
 
     @Test
diff --git a/jest-common/src/test/java/io/searchbox/snapshot/CreateSnapshotRepositoryTest.java b/jest-common/src/test/java/io/searchbox/snapshot/CreateSnapshotRepositoryTest.java
index 91dc1fb0..c0771ab2 100644
--- a/jest-common/src/test/java/io/searchbox/snapshot/CreateSnapshotRepositoryTest.java
+++ b/jest-common/src/test/java/io/searchbox/snapshot/CreateSnapshotRepositoryTest.java
@@ -1,6 +1,7 @@
 package io.searchbox.snapshot;
 
 import com.google.gson.Gson;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.elasticsearch.common.settings.Settings;
 import org.junit.Test;
 
@@ -27,7 +28,7 @@ public class CreateSnapshotRepositoryTest {
         CreateSnapshotRepository createSnapshotRepository = new CreateSnapshotRepository.Builder(repository).settings(registerRepositorySettings.build().getAsMap()).build();
 
         assertEquals("PUT", createSnapshotRepository.getRestMethodName());
-        assertEquals("/_snapshot/" + repository, createSnapshotRepository.getURI());
+        assertEquals("/_snapshot/" + repository, createSnapshotRepository.getURI(ElasticsearchVersion.UNKNOWN));
         String settings = new Gson().toJson(createSnapshotRepository.getData(new Gson()));
         assertEquals("\"{\\\"settings.chunk_size\\\":\\\"10m\\\",\\\"settings.compress\\\":\\\"true\\\",\\\"settings.location\\\":\\\"/mount/backups/my_backup\\\",\\\"settings.max_restore_bytes_per_sec\\\":\\\"40mb\\\",\\\"settings.max_snapshot_bytes_per_sec\\\":\\\"40mb\\\",\\\"settings.readonly\\\":\\\"false\\\",\\\"type\\\":\\\"fs\\\"}\"", settings);
     }
@@ -35,6 +36,6 @@ public class CreateSnapshotRepositoryTest {
     @Test
     public void testVerifyParam() {
         CreateSnapshotRepository createSnapshotRepository = new CreateSnapshotRepository.Builder(repository).verify(false).build();
-        assertEquals("/_snapshot/seohoo?verify=false", createSnapshotRepository.getURI());
+        assertEquals("/_snapshot/seohoo?verify=false", createSnapshotRepository.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/snapshot/CreateSnapshotTest.java b/jest-common/src/test/java/io/searchbox/snapshot/CreateSnapshotTest.java
index 78650a32..37dab655 100644
--- a/jest-common/src/test/java/io/searchbox/snapshot/CreateSnapshotTest.java
+++ b/jest-common/src/test/java/io/searchbox/snapshot/CreateSnapshotTest.java
@@ -1,6 +1,7 @@
 package io.searchbox.snapshot;
 
 import com.google.gson.Gson;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.elasticsearch.common.settings.Settings;
 import org.junit.Test;
 
@@ -18,7 +19,7 @@ public class CreateSnapshotTest {
     public void testSnapshot() {
         CreateSnapshot createSnapshot = new CreateSnapshot.Builder(repository, snapshot).waitForCompletion(true).build();
         assertEquals("PUT", createSnapshot.getRestMethodName());
-        assertEquals("/_snapshot/leeseohoo/leeseola?wait_for_completion=true", createSnapshot.getURI());
+        assertEquals("/_snapshot/leeseohoo/leeseola?wait_for_completion=true", createSnapshot.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
@@ -35,7 +36,7 @@ public class CreateSnapshotTest {
                 .build();
 
         assertEquals("PUT", createSnapshot.getRestMethodName());
-        assertEquals("/_snapshot/leeseohoo/leeseola?wait_for_completion=true", createSnapshot.getURI());
+        assertEquals("/_snapshot/leeseohoo/leeseola?wait_for_completion=true", createSnapshot.getURI(ElasticsearchVersion.UNKNOWN));
         String settings = new Gson().toJson(createSnapshot.getData(new Gson()));
         assertEquals("\"{\\\"ignore_unavailable\\\":\\\"true\\\",\\\"include_global_state\\\":\\\"false\\\",\\\"indices\\\":\\\"index_1,index_2\\\"}\"", settings);
     }
diff --git a/jest-common/src/test/java/io/searchbox/snapshot/DeleteSnapshotRepositoryTest.java b/jest-common/src/test/java/io/searchbox/snapshot/DeleteSnapshotRepositoryTest.java
index 41de1da6..5dbd456a 100644
--- a/jest-common/src/test/java/io/searchbox/snapshot/DeleteSnapshotRepositoryTest.java
+++ b/jest-common/src/test/java/io/searchbox/snapshot/DeleteSnapshotRepositoryTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.snapshot;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -14,6 +15,6 @@ public class DeleteSnapshotRepositoryTest {
 
         DeleteSnapshotRepository deleteSnapshotRepository = new DeleteSnapshotRepository.Builder(repository).build();
         assertEquals("DELETE", deleteSnapshotRepository.getRestMethodName());
-        assertEquals("/_snapshot/leeseohoo", deleteSnapshotRepository.getURI());
+        assertEquals("/_snapshot/leeseohoo", deleteSnapshotRepository.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/snapshot/DeleteSnapshotTest.java b/jest-common/src/test/java/io/searchbox/snapshot/DeleteSnapshotTest.java
index 12ea111a..b98dc32c 100644
--- a/jest-common/src/test/java/io/searchbox/snapshot/DeleteSnapshotTest.java
+++ b/jest-common/src/test/java/io/searchbox/snapshot/DeleteSnapshotTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.snapshot;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -16,6 +17,6 @@ public class DeleteSnapshotTest {
     public void testSnapshot() {
         DeleteSnapshot deleteSnapshot = new DeleteSnapshot.Builder(repository, snapshot).build();
         assertEquals("DELETE", deleteSnapshot.getRestMethodName());
-        assertEquals("/_snapshot/leeseohoo/leeseola", deleteSnapshot.getURI());
+        assertEquals("/_snapshot/leeseohoo/leeseola", deleteSnapshot.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/snapshot/GetSnapshotRepositoryTest.java b/jest-common/src/test/java/io/searchbox/snapshot/GetSnapshotRepositoryTest.java
index 86b3893b..97e932ff 100644
--- a/jest-common/src/test/java/io/searchbox/snapshot/GetSnapshotRepositoryTest.java
+++ b/jest-common/src/test/java/io/searchbox/snapshot/GetSnapshotRepositoryTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.snapshot;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import java.util.Arrays;
@@ -18,19 +19,19 @@ public class GetSnapshotRepositoryTest {
     public void testRepositorySingleName() {
         GetSnapshotRepository getSnapshotRepository = new GetSnapshotRepository.Builder(repository).build();
         assertEquals("GET", getSnapshotRepository.getRestMethodName());
-        assertEquals("/_snapshot/leeseohoo", getSnapshotRepository.getURI());
+        assertEquals("/_snapshot/leeseohoo", getSnapshotRepository.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testRepositoryMultipleNames() {
         GetSnapshotRepository getSnapshotRepository = new GetSnapshotRepository.Builder(repository)
                 .addRepository(Arrays.asList(repository, repository2)).build();
-        assertEquals("/_snapshot/leeseohoo,kangsungjeon", getSnapshotRepository.getURI());
+        assertEquals("/_snapshot/leeseohoo,kangsungjeon", getSnapshotRepository.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testRepositoryAll() {
         GetSnapshotRepository getSnapshotRepository = new GetSnapshotRepository.Builder().build();
-        assertEquals("/_snapshot/_all", getSnapshotRepository.getURI());
+        assertEquals("/_snapshot/_all", getSnapshotRepository.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }
diff --git a/jest-common/src/test/java/io/searchbox/snapshot/GetSnapshotTest.java b/jest-common/src/test/java/io/searchbox/snapshot/GetSnapshotTest.java
index f2d4a004..be05674e 100644
--- a/jest-common/src/test/java/io/searchbox/snapshot/GetSnapshotTest.java
+++ b/jest-common/src/test/java/io/searchbox/snapshot/GetSnapshotTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.snapshot;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import java.util.Arrays;
@@ -18,13 +19,13 @@ public class GetSnapshotTest {
     @Test
     public void testSnapshotMultipleNames() {
         GetSnapshot getSnapshotRepository = new GetSnapshot.Builder(repository).addSnapshot(Arrays.asList(snapshot, snapshot2)).build();
-        assertEquals("/_snapshot/kangsungjeon/leeseohoo,kangsungjeon", getSnapshotRepository.getURI());
+        assertEquals("/_snapshot/kangsungjeon/leeseohoo,kangsungjeon", getSnapshotRepository.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testSnapshotAll() {
         GetSnapshot getSnapshotRepository = new GetSnapshot.Builder(repository).build();
-        assertEquals("/_snapshot/kangsungjeon/_all", getSnapshotRepository.getURI());
+        assertEquals("/_snapshot/kangsungjeon/_all", getSnapshotRepository.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
 }
diff --git a/jest-common/src/test/java/io/searchbox/snapshot/RestoreSnapshotTest.java b/jest-common/src/test/java/io/searchbox/snapshot/RestoreSnapshotTest.java
index 642eb7b5..59c8790d 100644
--- a/jest-common/src/test/java/io/searchbox/snapshot/RestoreSnapshotTest.java
+++ b/jest-common/src/test/java/io/searchbox/snapshot/RestoreSnapshotTest.java
@@ -1,6 +1,7 @@
 package io.searchbox.snapshot;
 
 import com.google.gson.Gson;
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.elasticsearch.common.settings.Settings;
 import org.junit.Test;
 
@@ -26,7 +27,7 @@ public class RestoreSnapshotTest {
         RestoreSnapshot restoreSnapshot = new RestoreSnapshot.Builder(repository, snapshot)
                 .settings(registerRepositorySettings.build().getAsMap()).build();
         assertEquals("POST", restoreSnapshot.getRestMethodName());
-        assertEquals("/_snapshot/leeseohoo/leeseola/_restore", restoreSnapshot.getURI());
+        assertEquals("/_snapshot/leeseohoo/leeseola/_restore", restoreSnapshot.getURI(ElasticsearchVersion.UNKNOWN));
         String settings = new Gson().toJson(restoreSnapshot.getData(new Gson()));
         assertEquals("\"{\\\"ignore_unavailable\\\":\\\"true\\\",\\\"include_global_state\\\":\\\"false\\\",\\\"indices\\\":\\\"index_1,index_2\\\",\\\"rename_pattern\\\":\\\"index_(.+)\\\",\\\"rename_replacement\\\":\\\"restored_index_$1\\\"}\"", settings);
     }
diff --git a/jest-common/src/test/java/io/searchbox/snapshot/SnapshotStatusTest.java b/jest-common/src/test/java/io/searchbox/snapshot/SnapshotStatusTest.java
index e5cdf23b..41ad4bdc 100644
--- a/jest-common/src/test/java/io/searchbox/snapshot/SnapshotStatusTest.java
+++ b/jest-common/src/test/java/io/searchbox/snapshot/SnapshotStatusTest.java
@@ -1,5 +1,6 @@
 package io.searchbox.snapshot;
 
+import io.searchbox.client.config.ElasticsearchVersion;
 import org.junit.Test;
 
 import java.util.Arrays;
@@ -19,12 +20,12 @@ public class SnapshotStatusTest {
     public void testSnapshotSingleName() {
         SnapshotStatus snapshotStatus = new SnapshotStatus.Builder(repository).addSnapshot(snapshot).build();
         assertEquals("GET", snapshotStatus.getRestMethodName());
-        assertEquals("/_snapshot/leeseohoo/leeseola/_status", snapshotStatus.getURI());
+        assertEquals("/_snapshot/leeseohoo/leeseola/_status", snapshotStatus.getURI(ElasticsearchVersion.UNKNOWN));
     }
 
     @Test
     public void testSnapshotMultipleNames() {
         SnapshotStatus snapshotStatus = new SnapshotStatus.Builder(repository).addSnapshot(Arrays.asList(snapshot, snapshot2)).build();
-        assertEquals("/_snapshot/leeseohoo/leeseola,kangsungjeon/_status", snapshotStatus.getURI());
+        assertEquals("/_snapshot/leeseohoo/leeseola,kangsungjeon/_status", snapshotStatus.getURI(ElasticsearchVersion.UNKNOWN));
     }
 }