fix compile errors due to upstream changes

Original commit: elastic/x-pack-elasticsearch@40a2561fa3
This commit is contained in:
javanna 2017-01-24 13:09:01 +01:00 committed by Luca Cavanna
parent 1998b7ef46
commit a8bb433aa1
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ public class ExecutableSearchInput extends ExecutableInput<SearchInput, SearchIn
final Payload payload; final Payload payload;
if (input.getExtractKeys() != null) { if (input.getExtractKeys() != null) {
BytesReference bytes = XContentHelper.toXContent(response, XContentType.JSON); BytesReference bytes = XContentHelper.toXContent(response, XContentType.JSON, false);
// EMPTY is safe here because we never use namedObject // EMPTY is safe here because we never use namedObject
try (XContentParser parser = XContentHelper.createParser(NamedXContentRegistry.EMPTY, bytes)) { try (XContentParser parser = XContentHelper.createParser(NamedXContentRegistry.EMPTY, bytes)) {
Map<String, Object> filteredKeys = XContentFilterKeysUtils.filterMapOrdered(input.getExtractKeys(), parser); Map<String, Object> filteredKeys = XContentFilterKeysUtils.filterMapOrdered(input.getExtractKeys(), parser);

View File

@ -24,7 +24,7 @@ public final class WatcherUtils {
} }
public static Map<String, Object> responseToData(ToXContentObject response) throws IOException { public static Map<String, Object> responseToData(ToXContentObject response) throws IOException {
return XContentHelper.convertToMap(XContentHelper.toXContent(response, XContentType.JSON), false).v2(); return XContentHelper.convertToMap(XContentHelper.toXContent(response, XContentType.JSON, false), false).v2();
} }
public static Map<String, Object> flattenModel(Map<String, Object> map) { public static Map<String, Object> flattenModel(Map<String, Object> map) {