diff --git a/src/Nest/ElasticClient-Aliases.cs b/src/Nest/ElasticClient-Aliases.cs
index 91ed3b046e8..c0dae0e76d1 100644
--- a/src/Nest/ElasticClient-Aliases.cs
+++ b/src/Nest/ElasticClient-Aliases.cs
@@ -30,18 +30,22 @@ private string _createCommand(string command, AliasParams aliasParam)
return cmd;
}
- ///
- /// Get all the indices pointing to an alias
- ///
- public IEnumerable GetIndicesPointingToAlias(string alias)
- {
- var path = this.PathResolver.CreateIndexPath(alias, "/_aliases");
- var status = this.Connection.GetSync(path);
- var r = this.Deserialize>(status.Result);
- return r == null ? Enumerable.Empty() : r.Keys;
- }
+ ///
+ /// Get all the indices pointing to an alias
+ ///
+ public IEnumerable GetIndicesPointingToAlias(string alias)
+ {
+ var path = this.PathResolver.CreateIndexPath(alias, "/_aliases");
+ var status = this.Connection.GetSync(path);
+ if (!status.Success)
+ {
+ return Enumerable.Empty();
+ }
+ var r = this.Deserialize>(status.Result);
+ return r == null ? Enumerable.Empty() : r.Keys;
+ }
- ///
+ ///
/// Repoint an alias from a set of old indices to a set of new indices in one operation
///
public IIndicesOperationResponse Swap(string alias, IEnumerable oldIndices, IEnumerable newIndices)
diff --git a/src/Nest/ElasticClient-MultiGet.cs b/src/Nest/ElasticClient-MultiGet.cs
index 82a4b1574fd..29142c872f3 100644
--- a/src/Nest/ElasticClient-MultiGet.cs
+++ b/src/Nest/ElasticClient-MultiGet.cs
@@ -31,6 +31,24 @@ public IEnumerable MultiGet(IEnumerable ids)
return this.MultiGet(ids, this.PathResolver.CreateIndexTypePath(index, typeName));
}
///
+ /// Gets multiple documents of T by id in the specified index
+ ///
+ public IEnumerable MultiGet(string index, IEnumerable ids)
+ where T : class
+ {
+ return this.MultiGet(index, ids.Select(i => Convert.ToString(i)));
+ }
+ ///
+ /// Gets multiple documents of T by id in the specified index
+ ///
+ public IEnumerable MultiGet(string index, IEnumerable ids)
+ where T : class
+ {
+ var typeName = this.GetTypeNameFor();
+
+ return this.MultiGet(ids, this.PathResolver.CreateIndexTypePath(index, typeName));
+ }
+ ///
/// Gets multiple documents of T by id in the specified index and the specified typename for T
///
public IEnumerable MultiGet(string index, string type, IEnumerable ids)
diff --git a/src/Nest/Extensions/UriExtensions.cs b/src/Nest/Extensions/UriExtensions.cs
index 239f1ac01be..f9b31c0892b 100644
--- a/src/Nest/Extensions/UriExtensions.cs
+++ b/src/Nest/Extensions/UriExtensions.cs
@@ -6,7 +6,9 @@ public static class UriExtensions
{
public static string ToUrlAndOverridePath(this Uri uri, string path)
{
- return string.Format("http://{0}:{1}{2}", uri.Host, uri.Port, path);
+ return uri.Scheme == Uri.UriSchemeHttps ?
+ string.Format("https://{0}{1}", uri.Host, path) :
+ string.Format("http://{0}:{1}{2}", uri.Host, uri.Port, path);
}
}
}