-
-
Save kbachl/dd8c43718c7a462f4ab1 to your computer and use it in GitHub Desktop.
Java-Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
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