The number of shards and replicas are part of the source object you
pass in. I prefer to use CreateIndexRequests over using the
IndexRequestBuilder directly. The number of shards and replicas are
specified in the settings object that is passed into the
CreateIndexRequest.
By the way, you can learn a lot about using Java API by looking at the
integration tests of elasticsearch.
Igor
On Tuesday, September 25, 2012 12:23:02 PM UTC-4, Ivan Brusic wrote:
The number of shards and replicas are part of the source object you
pass in. I prefer to use CreateIndexRequests over using the
IndexRequestBuilder directly. The number of shards and replicas are
specified in the settings object that is passed into the
CreateIndexRequest.
Thanks for demonstrating another way with the API. My example code is
actually incomplete since I did not show how to create the actual
request with the settings!
createIndexRequest = new CreateIndexRequest(indexName, settings);
--
Ivan
On Tue, Sep 25, 2012 at 11:56 AM, Igor Motov imotov@gmail.com wrote:
Percival,
Here is another example that uses CreateIndexRequestBuilder that Ivan
mentioned:
By the way, you can learn a lot about using Java API by looking at the
integration tests of elasticsearch.
Igor
On Tuesday, September 25, 2012 12:23:02 PM UTC-4, Ivan Brusic wrote:
The number of shards and replicas are part of the source object you
pass in. I prefer to use CreateIndexRequests over using the
IndexRequestBuilder directly. The number of shards and replicas are
specified in the settings object that is passed into the
CreateIndexRequest.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.