From 4f299b801ee009e20cdb2853408e706777752ae3 Mon Sep 17 00:00:00 2001
From: Jason Tedor <jason@tedor.me>
Date: Tue, 12 Jul 2016 07:57:06 -0400
Subject: [PATCH] [elasticsearch]: document modes

This commit adds notes to the Elasticsearch documentation outlining the
difference between embedded and remote modes, and adds an example on
using remote mode.
---
 elasticsearch/README.md | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/elasticsearch/README.md b/elasticsearch/README.md
index 157ccec0..0e863c89 100644
--- a/elasticsearch/README.md
+++ b/elasticsearch/README.md
@@ -31,13 +31,28 @@ Clone the YCSB git repository and compile:
     
 Now you are ready to run! First, load the data:
 
-    ./bin/ycsb load elasticsearch -s -P workloads/workloada
+    ./bin/ycsb load elasticsearch -s -P workloads/workloada -p path.home=<path>
 
 Then, run the workload:
 
-    ./bin/ycsb run elasticsearch -s -P workloads/workloada
+    ./bin/ycsb run elasticsearch -s -P workloads/workloada -p path.home=<path>
 
-For further configuration see below: 
+Note that the `<path>` specified in each execution should be the same.
+
+The Elasticsearch binding has two modes of operation, embedded mode and remote
+mode. In embedded mode, the client creates an embedded instance of
+Elasticsearch that uses the specified `<path>` to persist data between
+executions.
+
+In remote mode, the client will hit a standalone instance of Elasticsearch. To
+use remote mode, add the flags `-p es.remote=true` and specify a hosts list via
+`-p es.hosts.list=<hostname1:port1>,...,<hostnamen:portn>`.
+
+    ./bin/ycsb run elasticsearch -s -P workloads/workloada -p es.remote=true \
+    -p es.hosts.list=<hostname1:port1>,...,<hostnamen:portn>`
+
+Note that `es.hosts.list` defaults to `localhost:9300`. For further
+configuration see below:
 
 ### Defaults Configuration
 The default setting for the Elasticsearch node that is created is as follows:
@@ -48,7 +63,7 @@ The default setting for the Elasticsearch node that is created is as follows:
     es.number_of_replicas=0
     es.remote=false
     es.newdb=false
-    es.hosts.list=localhost:9200 (only applies if es.remote=true)
+    es.hosts.list=localhost:9300 (only applies if es.remote=true)
 
 ### Custom Configuration
 If you wish to customize the settings used to create the Elasticsearch node
-- 
GitLab