Skip to content

Commit 72d2490

Browse files
committed
Clarifying connection parameters.
Fixes elastic#171 Thanks DavidAwad!
1 parent bdf2c4b commit 72d2490

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

elasticsearch/client/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ class Elasticsearch(object):
6464
Elasticsearch low-level client. Provides a straightforward mapping from
6565
Python to ES REST endpoints.
6666
67-
The instance has attributes `cat`, `cluster`, `indices`, `nodes` and
68-
`snapshot` that provide access to instances of
67+
The instance has attributes ``cat``, ``cluster``, ``indices``, ``nodes``
68+
and ``snapshot`` that provide access to instances of
6969
:class:`~elasticsearch.client.CatClient`,
7070
:class:`~elasticsearch.client.ClusterClient`,
7171
:class:`~elasticsearch.client.IndicesClient`,
@@ -100,7 +100,7 @@ class Elasticsearch(object):
100100
specify those::
101101
102102
# connect to localhost directly and another node using SSL on port 443
103-
# and an url_prefix
103+
# and an url_prefix. Note that ``port`` needs to be an int.
104104
es = Elasticsearch([
105105
{'host': 'localhost'},
106106
{'host': 'othernode', 'port': 443, 'url_prefix': 'es', 'use_ssl': True},

elasticsearch/connection/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class Connection(object):
2828
def __init__(self, host='localhost', port=9200, url_prefix='', timeout=10, **kwargs):
2929
"""
3030
:arg host: hostname of the node (default: localhost)
31-
:arg port: port to use (default: 9200)
31+
:arg port: port to use (integer, default: 9200)
3232
:arg url_prefix: optional url prefix for elasticsearch
33-
:arg timeout: default timeout in seconds (default: 10)
33+
:arg timeout: default timeout in seconds (float, default: 10)
3434
"""
3535
self.host = '%s://%s:%s' % (self.transport_schema, host, port)
3636
if url_prefix:

0 commit comments

Comments
 (0)