@@ -117,7 +117,7 @@ class Elasticsearch(object):
117
117
['localhost:443', 'other_host:443'],
118
118
# turn on SSL
119
119
use_ssl=True,
120
- # make sure we verify SSL certificates (off by default)
120
+ # make sure we verify SSL certificates
121
121
verify_certs=True,
122
122
# provide a path to CA certs on disk
123
123
ca_certs='/path/to/CA_certs'
@@ -131,7 +131,7 @@ class Elasticsearch(object):
131
131
['localhost:443', 'other_host:443'],
132
132
# turn on SSL
133
133
use_ssl=True,
134
- # make sure we verify SSL certificates (off by default)
134
+ # make sure we verify SSL certificates
135
135
verify_certs=True,
136
136
# provide a path to CA certs on disk
137
137
ca_certs='/path/to/CA_certs',
@@ -151,12 +151,12 @@ class Elasticsearch(object):
151
151
],
152
152
verify_certs=True
153
153
)
154
-
154
+
155
155
By default, `JSONSerializer
156
- <https://github.com/elastic/elasticsearch-py/blob/master/elasticsearch/serializer.py#L24>`_
156
+ <https://github.com/elastic/elasticsearch-py/blob/master/elasticsearch/serializer.py#L24>`_
157
157
is used to encode all outgoing requests.
158
158
However, you can implement your own custom serializer::
159
-
159
+
160
160
from elasticsearch.serializer import JSONSerializer
161
161
162
162
class SetEncoder(JSONSerializer):
@@ -166,7 +166,7 @@ def default(self, obj):
166
166
if isinstance(obj, Something):
167
167
return 'CustomSomethingRepresentation'
168
168
return JSONSerializer.default(self, obj)
169
-
169
+
170
170
es = Elasticsearch(serializer=SetEncoder())
171
171
172
172
"""
0 commit comments