From 9ce5d95786a3baf50be225cdf6c44a3943ff2988 Mon Sep 17 00:00:00 2001 From: aetter Date: Thu, 19 Aug 2021 13:23:14 -0700 Subject: [PATCH] Clean up spacing --- _clients/python.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/_clients/python.md b/_clients/python.md index 1a5bf9b0..0a44cfa9 100644 --- a/_clients/python.md +++ b/_clients/python.md @@ -32,7 +32,7 @@ from opensearch import OpenSearch host = 'localhost' port = 9200 auth = ('admin', 'admin') # For testing only. Don't store credentials in code. -ca_certs_path = '/full/path/to/root-ca.pem' # Provide a CA bundle if you use intermediate CAs with your root CA +ca_certs_path = '/full/path/to/root-ca.pem' # Provide a CA bundle if you use intermediate CAs with your root CA. # Optional client certificates if you don't want to use HTTP basic authentication. # client_cert_path = '/full/path/to/client.pem' @@ -41,7 +41,7 @@ ca_certs_path = '/full/path/to/root-ca.pem' # Provide a CA bundle if you use int # Create the client with SSL/TLS enabled, but hostname verification disabled. client = OpenSearch( hosts = [{'host': host, 'port': port}], - http_compress=True, # enables gzip compression for request bodies + http_compress = True, # enables gzip compression for request bodies http_auth = auth, # client_cert = client_cert_path, # client_key = client_key_path, @@ -75,10 +75,10 @@ document = { id = '1' response = client.index( - index=index_name, - body=document, - id=id, - refresh=True + index = index_name, + body = document, + id = id, + refresh = True ) print('\nAdding document:') @@ -97,16 +97,16 @@ query = { } response = client.search( - body=query, - index=index_name + body = query, + index = index_name ) print('\nSearch results:') print(response) # Delete the document. response = client.delete( - index=index_name, - id=id + index = index_name, + id = id ) print('\nDeleting document:') @@ -114,7 +114,7 @@ print(response) # Delete the index. response = client.indices.delete( - index=index_name + index = index_name ) print('\nDeleting index:')