Skip to content

Instantly share code, notes, and snippets.

@kbachl

kbachl/Exception Secret

Created March 13, 2011 11:32
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 kbachl/dd8c43718c7a462f4ab1 to your computer and use it in GitHub Desktop.
Save kbachl/dd8c43718c7a462f4ab1 to your computer and use it in GitHub Desktop.
Java-Code
Caused by: org.elasticsearch.transport.SendRequestTransportException: [][inet[/127.0.0.1:9300]][indices/bulk]
at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:194)
....
at line -> where bulk.execute().actionGet(); is
...
client.admin().indices().create(new CreateIndexRequest(index).mapping(type, mapping)).actionGet();
BulkRequestBuilder bulk = client.prepareBulk();
for (Object[] o : result) {
Map<String, Object> m = new HashMap<String, Object>();
.....
bulk.request().add(new IndexRequest(index).source(m));
}
bulk.execute().actionGet();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment