Skip to content

Instantly share code, notes, and snippets.

@suresk
Created April 10, 2016 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suresk/1d1623af22f92b5ce4b5ad6769de6a57 to your computer and use it in GitHub Desktop.
Save suresk/1d1623af22f92b5ce4b5ad6769de6a57 to your computer and use it in GitHub Desktop.
// Create the index
Settings.Builder settingsBuilder = Settings.builder();
for(Map.Entry<String, Integer> setting : config.getIndexSettings().entrySet())
{
settingsBuilder.put(setting.getKey(), setting.getValue());
}
elasticClient.admin().indices().create(new CreateIndexRequest(indexName, settingsBuilder.build()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment