asereda-gs commented on a change in pull request #1180: [CALCITE-3023] Upgrade
to Elasticsearch 7.0.0
URL: https://github.com/apache/calcite/pull/1180#discussion_r284032379
##########
File path:
elasticsearch/src/test/java/org/apache/calcite/adapter/elasticsearch/EmbeddedElasticsearchPolicy.java
##########
@@ -114,15 +114,17 @@ void createIndex(String index, Map<String, String>
mapping) throws IOException {
ObjectNode mappings = mapper().createObjectNode();
- ObjectNode properties =
mappings.with("mappings").with(index).with("properties");
+ ObjectNode properties = mappings.with("mappings").with("properties");
for (Map.Entry<String, String> entry: mapping.entrySet()) {
applyMapping(properties, entry.getKey(), entry.getValue());
}
// create index and mapping
final HttpEntity entity = new
StringEntity(mapper().writeValueAsString(mappings),
ContentType.APPLICATION_JSON);
- restClient().performRequest("PUT", "/" + index, Collections.emptyMap(),
entity);
+ final Request r = new Request("PUT", "/" + index);
Review comment:
New API doesn't allow entity in constructor ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services