diff --git a/reference/mongo/mongo/gethosts.xml b/reference/mongo/mongo/gethosts.xml
index 7a6f09ef53..20a16c898c 100644
--- a/reference/mongo/mongo/gethosts.xml
+++ b/reference/mongo/mongo/gethosts.xml
@@ -15,8 +15,10 @@
- This method can only be used with a connection to a replica set. It returns
- the status of all of the hosts in the set.
+ This method is only useful with a connection to a replica set. It returns
+ the status of all of the hosts in the set. Without a replica set, it will
+ just return an array with one element containing the host that you are
+ connected to.
@@ -44,6 +46,10 @@
array(2) {
["A:27017"]=>
array(4) {
+ ["host"]=>
+ "A"
+ ["port"]=>
+ 27017
["health"]=>
int(1)
["state"]=>
@@ -55,6 +61,10 @@ array(2) {
}
["B:27017"]=>
array(4) {
+ ["host"]=>
+ "B"
+ ["port"]=>
+ 27017
["health"]=>
int(1)
["state"]=>
@@ -66,6 +76,10 @@ array(2) {
}
["C:27017"]=>
array(4) {
+ ["host"]=>
+ "C"
+ ["port"]=>
+ 27017
["health"]=>
int(1)
["state"]=>
@@ -84,6 +98,36 @@ array(2) {
thus is likely closer or handling less load) than C.
+
+
+ &reftitle.changelog;
+
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 1.2.10
+
+
+ Support for non-replicasets was added.
+
+
+ The returned array elements now also include the
+ hostname and port.
+
+
+
+
+
+
+
+