Clarifying connection parameters.

Fixes #171 Thanks DavidAwad!
This commit is contained in:
Honza Král
2014-12-30 17:21:22 +01:00
parent bdf2c4b9f4
commit 72d24906d7
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -64,8 +64,8 @@ class Elasticsearch(object):
Elasticsearch low-level client. Provides a straightforward mapping from
Python to ES REST endpoints.
The instance has attributes `cat`, `cluster`, `indices`, `nodes` and
`snapshot` that provide access to instances of
The instance has attributes ``cat``, ``cluster``, ``indices``, ``nodes``
and ``snapshot`` that provide access to instances of
:class:`~elasticsearch.client.CatClient`,
:class:`~elasticsearch.client.ClusterClient`,
:class:`~elasticsearch.client.IndicesClient`,
@@ -100,7 +100,7 @@ class Elasticsearch(object):
specify those::
# connect to localhost directly and another node using SSL on port 443
# and an url_prefix
# and an url_prefix. Note that ``port`` needs to be an int.
es = Elasticsearch([
{'host': 'localhost'},
{'host': 'othernode', 'port': 443, 'url_prefix': 'es', 'use_ssl': True},
+2 -2
View File
@@ -28,9 +28,9 @@ class Connection(object):
def __init__(self, host='localhost', port=9200, url_prefix='', timeout=10, **kwargs):
"""
:arg host: hostname of the node (default: localhost)
:arg port: port to use (default: 9200)
:arg port: port to use (integer, default: 9200)
:arg url_prefix: optional url prefix for elasticsearch
:arg timeout: default timeout in seconds (default: 10)
:arg timeout: default timeout in seconds (float, default: 10)
"""
self.host = '%s://%s:%s' % (self.transport_schema, host, port)
if url_prefix: